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

@include iro.props-namespace('container') {
    @include iro.props-store((
        --dims: (
            --narrow-125: iro.fn-px-to-rem(720px),
            --narrow:     iro.fn-px-to-rem(610px),
            --narrow-75:  iro.fn-px-to-rem(500px),
            --pad-i:      fn.global-dim(--size --400),
            --pad-b:      fn.global-dim(--size --800),
        )
    ));

    @include iro.props-store((
        --dims: (
            --pad-i: fn.global-dim(--size --200),
            --pad-b: fn.global-dim(--size --600),
        )
    ), 'sm');

    @include iro.props-store((
        --dims: (
            --pad-i: fn.global-dim(--size --150),
            --pad-b: fn.global-dim(--size --450),
        )
    ), 'xs');

    @include iro.bem-layout(iro.props-namespace()) {
        @each $size in 'narrow-125' 'narrow' 'narrow-75' {
            @include iro.bem-modifier($size) {
                max-inline-size: fn.dim(--#{$size});
                margin-inline:   auto;
            }
        }

        @include iro.bem-modifier('pad-i') {
            padding-inline: fn.dim(--pad-i);
        }

        @include iro.bem-modifier('pad-b') {
            padding-block: fn.dim(--pad-b);
        }
    }
}