From 0936b9e3ccf24671f259f97c3527f14812a04949 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 19 Oct 2024 19:18:17 +0200 Subject: Fix --- src/objects/_badge.vars.scss | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'src/objects/_badge.vars.scss') diff --git a/src/objects/_badge.vars.scss b/src/objects/_badge.vars.scss index 4941ccf..5629a9c 100644 --- a/src/objects/_badge.vars.scss +++ b/src/objects/_badge.vars.scss @@ -119,36 +119,41 @@ $static-themes: props.def(--o-badge); )); } -$themes-config: accent positive negative warning !default; +$themes-config: ( + accent: --accent, + positive: --positive, + negative: --negative, + warning: --warning, +) !default; $themes: props.def(--o-badge); -@each $theme in $themes-config { +@each $theme, $key in $themes-config { $themes: props.merge($themes, ( --#{$theme}: ( - --bg: props.get(core.$theme, --#{$theme}-static, --900), - --label: props.get(core.$theme, --#{$theme}-static, --900-text), + --bg: props.get(core.$theme, #{$key}-static, --900), + --label: props.get(core.$theme, #{$key}-static, --900-text), --hover: ( - --bg: props.get(core.$theme, --#{$theme}-static, --1000), - --label: props.get(core.$theme, --#{$theme}-static, --1000-text), + --bg: props.get(core.$theme, #{$key}-static, --1000), + --label: props.get(core.$theme, #{$key}-static, --1000-text), ), --active: ( - --bg: props.get(core.$theme, --#{$theme}-static, --1100), - --label: props.get(core.$theme, --#{$theme}-static, --1000-text), + --bg: props.get(core.$theme, #{$key}-static, --1100), + --label: props.get(core.$theme, #{$key}-static, --1000-text), ), --quiet: ( - --bg: props.get(core.$theme, --#{$theme}, --200), - --label: props.get(core.$theme, --#{$theme}, --1100), + --bg: props.get(core.$theme, $key, --200), + --label: props.get(core.$theme, $key, --1100), --hover: ( - --bg: props.get(core.$theme, --#{$theme}, --300), - --label: props.get(core.$theme, --#{$theme}, --1200), + --bg: props.get(core.$theme, $key, --300), + --label: props.get(core.$theme, $key, --1200), ), --active: ( - --bg: props.get(core.$theme, --#{$theme}, --400), - --label: props.get(core.$theme, --#{$theme}, --1300), + --bg: props.get(core.$theme, $key, --400), + --label: props.get(core.$theme, $key, --1300), ), ) ) -- cgit v1.2.3-70-g09d2