From d23a2cf25ccc33f49d73ee3da2f775c0d4fa0784 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 27 Jun 2024 09:56:02 +0200 Subject: Update --- src/objects/_alert.scss | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/objects/_alert.scss (limited to 'src/objects/_alert.scss') diff --git a/src/objects/_alert.scss b/src/objects/_alert.scss new file mode 100644 index 0000000..067c00c --- /dev/null +++ b/src/objects/_alert.scss @@ -0,0 +1,43 @@ +@use 'iro-sass/src/index' as iro; +@use '../functions' as fn; + +$themes: 'accent' 'positive' 'negative' 'warning' !default; + +@include iro.props-namespace('alert') { + @include iro.props-store(( + --dims: ( + --border: fn.global-dim(--border --medium), + --pad-i: fn.global-dim(--size --250), + --pad-b: fn.global-dim(--size --200), + --rounding: fn.global-dim(--rounding), + ), + --colors: ( + --bg: fn.global-color(--bg-l2), + --border: fn.global-color(--text-mute-more), + ), + )); + + @each $theme in $themes { + @include iro.props-store(( + --colors: ( + --#{$theme}: ( + --border: fn.global-color(--#{$theme} --700), + ), + ), + )); + } + + @include iro.bem-object(iro.props-namespace()) { + padding-block: fn.dim(--pad-b); + padding-inline: fn.dim(--pad-i); + border: fn.dim(--border) solid fn.color(--border); + border-radius: fn.dim(--rounding); + background-color: fn.color(--bg); + + @each $theme in $themes { + @include iro.bem-modifier($theme) { + border-color: fn.color(--#{$theme} --border); + } + } + } +} -- cgit v1.2.3-54-g00ecf