summaryrefslogtreecommitdiffstats
path: root/src/.old/objects/_list-group.scss
blob: a346828bd9faa43bff99c4d8d34378921eafda21 (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
61
@use 'iro-sass/src/index' as iro;
@use '../functions' as fn;

@include iro.props-namespace('list-group') {
    @include iro.props-store((
        --dims: (
            --pad-i:    fn.global-dim(--size --175),
            --pad-b:    fn.global-dim(--size --125),
            --rounding: fn.global-dim(--rounding),
            --border:   fn.global-dim(--border --thin),
        ),
        --colors: (
            --bg:     fn.global-color(--base --75),
            --border: fn.global-color(--border),
            --hover:  fn.global-color(--border-mute),
            --active: fn.global-color(--border),
        )
    ));

    @include iro.bem-object(iro.props-namespace()) {
        border:           fn.dim(--border) solid fn.color(--border);
        border-radius:    fn.dim(--rounding);
        background-color: fn.color(--bg);

        @include iro.bem-elem('item') {
            padding-block:  fn.dim(--pad-b);
            padding-inline: fn.dim(--pad-i);

            @include iro.bem-next-twin-elem {
                border-width:             0;
                border-block-start-width: fn.dim(--border);
                border-style:             solid;
                border-color:             fn.color(--border);
            }

            @include iro.bem-multi('&:link, &:visited, &:enabled', 'modifier' 'interactive') {
                &:hover,
                &:focus-visible {
                    background-color: fn.color(--hover);
                }

                &:active {
                    background-color: fn.color(--active);
                }
            }
        }

        @include iro.bem-modifier('horizontal') {
            display: flex;

            @include iro.bem-elem('item') {
                flex: 1 0 auto;

                @include iro.bem-next-twin-elem {
                    border-block-start-width:  0;
                    border-inline-start-width: fn.dim(--border);
                }
            }
        }
    }
}