summaryrefslogtreecommitdiffstats
path: root/src/scopes/_lists.scss
blob: fc8a5776c7c4d27d2611d383dfedaebcc33bd8d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@use 'sass:meta';
@use 'iro-sass/src/bem';
@use 'iro-sass/src/props';
@use '../props' as *;
@use '../core.vars' as core;

@forward 'lists.vars';
@use 'lists.vars' as vars;

@mixin styles {
	@include materialize-at-root(meta.module-variables('vars'));

	@include bem.scope('lists') {
		ul,
		ol {
			padding-inline-start: props.get(vars.$indent);
			margin-block-start:   props.get(vars.$margin-bs);

			ul,
			ol {
				margin-block-start: 0;
			}
		}

		ul {
			list-style: disc;
		}

		ol {
			list-style: decimal;
		}

		dl {
			padding:       0;
			margin-block:  props.get(vars.$margin-bs) 0;
			margin-inline: 0;
		}

		dt {
			font-weight: bold;
			color:       props.get(core.$theme, --heading);
		}

		dd {
			margin-block:  0;
			margin-inline: props.get(vars.$indent) 0;
		}

		@include bem.modifier('compact') {
			ul,
			ol {
				padding-inline-start: calc(props.get(vars.$compact--indent) - 3px);
			}

			dd {
				margin-inline-start: calc(props.get(vars.$compact--indent) - 3px);
			}
		}
	}
}