summaryrefslogtreecommitdiffstats
path: root/src/scopes/_lists.scss
blob: 2ea342f006ad8bb74d51a21f27583d8d09970cbb (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
@use 'iro-sass/src/index' as iro;
@use '../functions' as fn;

@include iro.props-namespace('lists') {
    @include iro.props-store((
        --dims: (
            --indent:     fn.global-dim(--list --indent),
            --margin-top: fn.global-dim(--paragraph --margin-top),
        )
    ), 'dims');

    @include iro.props-store((
        --colors: (
            --border: fn.global-color(--obj-hi),
        )
    ), 'colors');

    @include iro.bem-scope(iro.props-namespace()) {
        ul,
        ol {
            margin-top:   fn.dim(--margin-top);
            padding-left: fn.dim(--indent);

            ul,
            ol {
                margin-top: 0;
            }
        }

        ul {
            list-style: disc;
        }

        ol {
            list-style: decimal;
        }

        dl {
            margin:  fn.dim(--margin-top) 0 0;
            padding: 0;
        }

        dt {
            color:       fn.global-color(--fg-lo);
            font-weight: bold;
        }

        dd {
            margin: 0 0 0 fn.dim(--indent);
        }
    }
}