summaryrefslogtreecommitdiffstats
path: root/src/objects
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-03-16 19:00:21 +0100
committerVolpeon <git@volpeon.ink>2022-03-16 19:00:21 +0100
commit210349f2a28fb37b8cafac980e3f5fac894cc7f9 (patch)
treec726496e100381814aa38fcaf69aa02078fe8d62 /src/objects
parentReverted grays (diff)
downloadiro-design-210349f2a28fb37b8cafac980e3f5fac894cc7f9.tar.gz
iro-design-210349f2a28fb37b8cafac980e3f5fac894cc7f9.tar.bz2
iro-design-210349f2a28fb37b8cafac980e3f5fac894cc7f9.zip
Added alert
Diffstat (limited to 'src/objects')
-rw-r--r--src/objects/_alert.scss48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/objects/_alert.scss b/src/objects/_alert.scss
new file mode 100644
index 0000000..0bb8485
--- /dev/null
+++ b/src/objects/_alert.scss
@@ -0,0 +1,48 @@
1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn;
3
4@include iro.props-namespace('alert') {
5 @include iro.props-store((
6 --dims: (
7 --border-width: 2px,
8 --pad-x: fn.global-dim(--size --250),
9 --pad-y: fn.global-dim(--size --250),
10 --rounding: 4px,
11 ),
12 ), 'dims');
13
14 @include iro.props-store((
15 --colors: (
16 --bg: fn.global-color(--bg-hi2),
17 --border: fn.global-color(--fg-hi2),
18 --border-primary: fn.global-color(--accent --primary --bg-hi),
19 --border-error: fn.global-color(--accent --error --bg-hi),
20 --border-success: fn.global-color(--accent --success --bg-hi),
21 --border-warning: fn.global-color(--accent --warning --bg-hi),
22 ),
23 ), 'colors');
24
25 @include iro.bem-object(iro.props-namespace()) {
26 padding: fn.dim(--pad-y) fn.dim(--pad-x);
27 border: fn.dim(--border-width) solid fn.color(--border);
28 border-radius: fn.dim(--rounding);
29 background-color: fn.color(--bg);
30 color: fn.global-color(--fg);
31
32 @include iro.bem-modifier('primary') {
33 border-color: fn.color(--border-primary);
34 }
35
36 @include iro.bem-modifier('error') {
37 border-color: fn.color(--border-error);
38 }
39
40 @include iro.bem-modifier('success') {
41 border-color: fn.color(--border-success);
42 }
43
44 @include iro.bem-modifier('warning') {
45 border-color: fn.color(--border-warning);
46 }
47 }
48}