summaryrefslogtreecommitdiffstats
path: root/src_old/layouts/_media.scss
blob: c42aa3ea99dc095109568ad030ceed02f580d747 (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
@use 'iro-sass/src/index' as iro;
@use '../functions' as fn;

$sizes: 'gapless' 'sm' 'lg' 'xl' !default;

@include iro.props-namespace('media') {
    @include iro.props-store((
        --dims: (
            --gap: fn.global-dim(--size --150),

            --gapless: 0,
            --sm: fn.global-dim(--size --100),
            --lg: fn.global-dim(--size --300),
            --xl: fn.global-dim(--size --450),
        )
    ));

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

        @each $size in $sizes {
            @include iro.bem-modifier($size) {
                gap: fn.dim(--#{$size});
            }
        }

        @include iro.bem-modifier('wrap') {
            flex-wrap: wrap;
        }

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

            @include iro.bem-modifier('shrink', 'main') {
                flex-shrink:     1;
                min-inline-size: 0;
            }

            @include iro.bem-modifier('main') {
                inline-size: 100%;
            }
        }
    }
}