summaryrefslogtreecommitdiffstats
path: root/src/objects/_alert.scss
blob: 3aeb781d6cc193108f3bc71b59faae7ee38605ec (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 "sass:map";
@use "sass:meta";
@use "pkg:iro-sass/bem";
@use "pkg:iro-sass/props";
@use "../props" as *;

@forward "alert.vars";
@use "alert.vars" as vars;

@mixin styles {
	@include materialize-at-root(meta.module-variables("vars"));

	@include bem.object("alert") {
		padding-block: props.get(vars.$pad-b);
		padding-inline: props.get(vars.$pad-i);
		background-color: props.get(vars.$bg-color);
		border: props.get(vars.$border-width) solid transparent;
		border-color: props.get(vars.$border-color);
		border-radius: props.get(vars.$rounding);
		box-shadow: props.get(vars.$shadow-x) props.get(vars.$shadow-y) props.get(vars.$shadow-blur)
			props.get(vars.$shadow-grow) props.get(vars.$shadow-color);

		&::before {
			display: block;
			margin-block: -100em 100em;
			content: "";
		}

		@each $mod, $theme in vars.$themes-config {
			@include bem.modifier($mod) {
				background-color: props.get(vars.$themes, $theme, --bg-color);
				border-color: props.get(vars.$themes, $theme, --border-color);
				box-shadow: props.get(vars.$shadow-x) props.get(vars.$shadow-y)
					props.get(vars.$shadow-blur) props.get(vars.$shadow-grow)
					props.get(vars.$themes, $theme, --shadow-color);
			}
		}
	}
}