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

@include iro.props-namespace('backdrop') {
    @include iro.props-store((
        --dims: (
            --z-index: 10000,
            --pad-x:   fn.global-dim(--spacing --sm),
            --pad-y:   fn.global-dim(--spacing --sm),
        ),
    ), 'dims');

    @include iro.props-store((
        --colors: (
            --bg: rgba(#000, .3),
        ),
    ), 'colors');

    @include iro.props-store((
        --colors: (
            --bg: rgba(#000, .75),
        ),
    ), 'colors-dark');

    @include iro.props-store((
        --dims: (
            --pad-y: iro.fn-px-to-rem(30px),
        )
    ), 'sm');

    @include iro.bem-object(iro.props-namespace()) {
        display:          flex;
        position:         fixed;
        z-index:          fn.dim(--z-index);
        top:              0;
        right:            0;
        bottom:           0;
        left:             0;
        box-sizing:       border-box;
        flex-direction:   column;
        padding:          fn.dim(--pad-y) fn.dim(--pad-x);
        background-color: fn.color(--bg);
    }
}