summaryrefslogtreecommitdiffstats
path: root/src/objects/_alert.vars.scss
blob: aedd9176434a03fcc6c2d5a9bcf597698b48c593 (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
@use "pkg:iro-sass/props";
@use "../core.vars" as core;

$border-width: props.def(--o-alert--border-width, props.get(core.$border-width--medium)) !default;
$pad-i: props.def(--o-alert--pad-i, props.get(core.$size--250)) !default;
$pad-b: props.def(--o-alert--pad-b, props.get(core.$size--200)) !default;
$rounding: props.def(--o-alert--rounding, props.get(core.$rounding)) !default;

$shadow-x: props.def(--o-alert--shadow-x, props.get(core.$shadow--l2--x)) !default;
$shadow-y: props.def(--o-alert--shadow-y, props.get(core.$shadow--l2--y)) !default;
$shadow-blur: props.def(--o-alert--shadow-blur, props.get(core.$shadow--l2--blur)) !default;
$shadow-grow: props.def(--o-alert--shadow-grow, props.get(core.$shadow--l2--grow)) !default;

$bg-color: props.def(--o-alert--bg-color, props.get(core.$theme, --bg-l2), "color") !default;
$border-color: props.def(
	--o-alert--border-color,
	props.get(core.$theme, --text-mute-more) props.get(core.$theme, --text-mute-more)
		props.get(core.$theme, --text-mute),
	"color"
) !default;

$shadow-color: props.def(
	--o-alert--shadow-color,
	props.get(core.$transparent-colors, --black, --200),
	"color"
) !default;

$themes-config: (
	accent: --accent,
	positive: --positive,
	negative: --negative,
	warning: --warning,
) !default;

$themes: props.def(--o-alert, (), "color");

@each $theme, $key in $themes-config {
	$themes: props.merge(
		$themes,
		(
			$key: (
					--bg-color: props.get(core.$theme, --bg-l2),
					--border-color: props.get(core.$theme, $key, --700)
						props.get(core.$theme, $key, --700)
						props.get(core.$theme, $key, --800),
					--shadow-color: props.get(core.$theme, $key, --200),
				),
		)
	);
}