summaryrefslogtreecommitdiffstats
path: root/src/objects/_navbar.vars.scss
blob: 5839eff014f1f97f4127a4a4ea2b9c82c4c7c553 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@use 'sass:map';
@use 'sass:string';
@use 'iro-sass/src/props';
@use '../core.vars' as core;

$block-size: props.def(--o-navbar--block-size, props.get(core.$size--800)) !default;
$spacing:    props.def(--o-navbar--spacing, props.get(core.$size--200)) !default;

$item--pad-i:     props.def(--o-navbar--item--pad-i, props.get(core.$size--175)) !default;
$item--pad-b:     props.def(--o-navbar--item--pad-b, props.get(core.$size--40)) !default;
$item--font-size: props.def(--o-navbar--item--font-size, props.get(core.$font-size--75)) !default;

$key-focus--border-width:  props.def(--o-navbar--key-focus--border-width, props.get(core.$key-focus--border-width)) !default;
$key-focus--border-offset: props.def(--o-navbar--key-focus--border-offset, props.get(core.$key-focus--border-offset)) !default;
$key-focus--outline-width: props.def(--o-navbar--key-focus--outline-width, props.get(core.$key-focus--outline-width)) !default;

$default-theme-override: () !default;
$default-theme: map.deep-merge((
    --label-color:  props.get(core.$theme, --text),

    --hover: (
        --bg-color:    props.get(core.$theme, --border-mute),
        --label-color: props.get(core.$theme, --heading),
    ),

    --active: (
        --bg-color:    props.get(core.$theme, --border),
        --label-color: props.get(core.$theme, --heading),
    ),

    --disabled: (
        --label-color: props.get(core.$theme, --border-strong),
    ),

    --key-focus: (
        --label:   props.get(core.$theme, --focus, --text),
        --border:  props.get(core.$theme, --focus, --border),
        --outline: props.get(core.$theme, --focus, --outline),
    ),

    --selected: (
        --bg-color:     props.get(core.$theme, --heading),
        --label-color:  props.get(core.$theme, --base, --50),

        --hover: (
            --bg-color:     props.get(core.$theme, --text),
            --label-color:  props.get(core.$theme, --base, --50),
        ),

        --active: (
            --bg-color:     props.get(core.$theme, --text-mute),
            --label-color:  props.get(core.$theme, --base, --50),
        ),

        --disabled: (
            --bg-color:     props.get(core.$theme, --border-mute),
            --label-color:  props.get(core.$theme, --border-strong),
        ),
    ),

    --quiet: (
        --selected: (
            --bg-color:     props.get(core.$theme, --accent, --200),
            --label-color:  props.get(core.$theme, --accent, --1100),

            --hover: (
                --bg-color:     props.get(core.$theme, --accent, --300),
                --label-color:  props.get(core.$theme, --accent, --1200),
            ),
    
            --active: (
                --bg-color:     props.get(core.$theme, --accent, --400),
                --label-color:  props.get(core.$theme, --accent, --1300),
            ),

            --disabled: (
                --bg-color:     props.get(core.$theme, --accent, --200),
                --label-color:  props.get(core.$theme, --accent, --800),
            ),
        )
    )
), $default-theme-override) !default;
$default-theme: props.def(--o-navbar, $default-theme, 'color');