summaryrefslogtreecommitdiff
path: root/scss/notifpopups.scss
blob: 92d2760346d5ae3f7af9f3765d686a33c6f1c5dc (plain)
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
49
50
51
@use "sass:color";
@use "scheme";
@use "lib";
@use "font";

@mixin popup($colour) {
    .separator {
        background-color: $colour;
    }

    .image {
        @include lib.border($colour, 0.05);
    }
}

.notifpopups {
    min-width: lib.s(425);
    padding-left: lib.s(10); // So notifications can overshoot for init animation
    padding-right: lib.s(5);
    padding-top: lib.s(5);

    .notification {
        .wrapper {
            padding: lib.s(5); // For shadow
        }

        .inner {
            @include lib.rounded(10);
            @include lib.shadow;

            background-color: scheme.$base;

            &.low {
                @include popup(scheme.$overlay0);
            }

            &.normal {
                @include popup(scheme.$primary);
            }

            &.critical {
                @include lib.border(scheme.$error, 0.5);
                @include popup(scheme.$error);

                @if not scheme.$borders {
                    background-color: color.mix(scheme.$base, scheme.$error, 95%);
                }
            }
        }
    }
}