From 48cb00040763459fc46d4aa108bf72c12f48f422 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 21 Jun 2024 23:07:50 +0200 Subject: WIP: Refactoring --- src/.old/objects/_alert.scss | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/.old/objects/_alert.scss (limited to 'src/.old/objects/_alert.scss') diff --git a/src/.old/objects/_alert.scss b/src/.old/objects/_alert.scss new file mode 100644 index 0000000..289ef10 --- /dev/null +++ b/src/.old/objects/_alert.scss @@ -0,0 +1,55 @@ +@use 'iro-sass/src/index' as iro; +@use '../functions' as fn; + +@include iro.props-namespace('alert') { + @include iro.props-store(( + --dims: ( + --border: 1px, + --pad-x: fn.global-dim(--size --250), + --pad-y: fn.global-dim(--size --200), + --rounding: 4px, + ), + ), 'dims'); + + @include iro.props-store(( + --colors: ( + --bg: fn.global-color(--bg-hi2), + --border: fn.global-color(--fg-hi2), + --border-primary: fn.global-color(--accent --primary --solid --bg-hi), + --border-error: fn.global-color(--accent --error --solid --bg-hi), + --border-success: fn.global-color(--accent --success --solid --bg-hi), + --border-warning: fn.global-color(--accent --warning --solid --bg-hi), + ), + ), 'colors'); + + @include iro.props-store(( + --dims: ( + --pad-x: fn.global-dim(--size --200), + --pad-y: fn.global-dim(--size --150), + ), + ), 'sm'); + + @include iro.bem-object(iro.props-namespace()) { + padding: fn.dim(--pad-y) fn.dim(--pad-x); + border: fn.dim(--border) solid fn.color(--border); + border-radius: fn.dim(--rounding); + background-color: fn.color(--bg); + color: fn.global-color(--fg); + + @include iro.bem-modifier('primary') { + border-color: fn.color(--border-primary); + } + + @include iro.bem-modifier('error') { + border-color: fn.color(--border-error); + } + + @include iro.bem-modifier('success') { + border-color: fn.color(--border-success); + } + + @include iro.bem-modifier('warning') { + border-color: fn.color(--border-warning); + } + } +} -- cgit v1.2.3-70-g09d2