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

$themes: 'accent' 'positive' 'negative' 'warning' !default;

@include iro.props-namespace('status-indicator') {
    @include iro.props-store((
        --dims: (
            --size: fn.global-dim(--size --125),
        ),
        --colors: (
            --default: fn.global-color(--border-strong),
            --primary: fn.global-color(--text),
        ),
    ));

    @each $theme in $themes {
        @include iro.props-store((
            --colors: (
                --#{$theme}: fn.global-color(--#{$theme} --700),
            ),
        ));
    }

    @include iro.bem-object(iro.props-namespace()) {
        display:          inline-block;
        inline-size:      fn.dim(--size);
        block-size:       fn.dim(--size);
        border-radius:    10em;
        background-color: fn.color(--default);
        vertical-align:   middle;

        @each $theme in $themes {
            @include iro.bem-is($theme) {
                background-color: fn.color(--#{$theme});
            }
        }
    }
}