summaryrefslogtreecommitdiffstats
path: root/src/layouts/_container.scss
blob: fcc4837c95124f73febc4cdb5441ed1fb1b909ea (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
@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-x:      fn.global-dim(--size --400),
            --pad-y:      fn.global-dim(--size --800),
        )
    ));

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

    @include iro.props-store((
        --dims: (
            --pad-x: fn.global-dim(--size --150),
            --pad-y: 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-right:    auto;
                margin-left:     auto;
            }
        }

        @include iro.bem-modifier('pad-x') {
            padding-right: fn.dim(--pad-x);
            padding-left:  fn.dim(--pad-x);
        }

        @include iro.bem-modifier('pad-y') {
            padding-top:    fn.dim(--pad-y);
            padding-bottom: fn.dim(--pad-y);
        }
    }
}