diff options
Diffstat (limited to 'src/objects')
| -rw-r--r-- | src/objects/_alert.scss | 48 |
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 | } | ||
