summaryrefslogtreecommitdiffstats
path: root/src/layouts/_card.scss
blob: 3022da0e9bba3cdde7c47acfd53190bb1411cc1e (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
@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: fn.global-dim(--size --150),
            --pad-y: fn.global-dim(--size --85),
            --75: (
                --pad-x: fn.global-dim(--size --100),
                --pad-y: fn.global-dim(--size --50),
            ),
            --200: (
                --pad-x: fn.global-dim(--size --300),
                --pad-y: fn.global-dim(--size --150),
            )
        )
    ), 'dims');

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

        @include iro.bem-modifier('75') {
            padding: fn.dim(--75 --pad-y) fn.dim(--75 --pad-x);
            gap:     fn.dim(--75 --pad-x);
        }

        @include iro.bem-modifier('200') {
            padding: fn.dim(--200 --pad-y) fn.dim(--200 --pad-x);
            gap:     fn.dim(--200 --pad-x);
        }

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

        @include iro.bem-modifier('gapless') {
            gap: 0;
        }

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

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