summaryrefslogtreecommitdiffstats
path: root/src/layouts/_card.scss
blob: a5b9028b4d9f6637c1c19eccd60e19224c3bd388 (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
@use 'iro-sass/src/index' as iro;
@use 'include-media/dist/include-media' as media;
@use '../functions' as fn;

@include iro.props-namespace('card') {
    @include iro.props-store((
        --dims: (
            --pad-x: .6rem,
            --pad-y: .4rem,
            --lg: (
                --pad-x: .9rem,
                --pad-y: .7rem,
            )
        )
    ), 'dims');

    @include iro.bem-layout(iro.props-namespace()) {
        display:     flex;
        align-items: center;
        padding:     prop(--dims --pad-y) prop(--dims --pad-x);
        gap:         prop(--dims --pad-x);
        line-height: 1.4;

        @include iro.bem-modifier('lg') {
            padding: prop(--dims --lg --pad-y) prop(--dims --lg --pad-x);
            gap:     prop(--dims --lg --pad-x);
        }

        @include iro.bem-modifier('flush') {
            padding: 0;
        }

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

            @include iro.bem-modifier('main') {
                width:     100%;
                min-width: 0;
            }
        }
    }
}