From 0936b9e3ccf24671f259f97c3527f14812a04949 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 19 Oct 2024 19:18:17 +0200 Subject: Fix --- src/objects/_button.vars.scss | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'src/objects/_button.vars.scss') diff --git a/src/objects/_button.vars.scss b/src/objects/_button.vars.scss index cc82d46..b3eb2b5 100644 --- a/src/objects/_button.vars.scss +++ b/src/objects/_button.vars.scss @@ -60,9 +60,9 @@ $default-theme: props.def(--o-button, ( ), --key-focus: ( - --label: props.get(core.$theme, --focus --text), - --border: props.get(core.$theme, --focus --border), - --outline: props.get(core.$theme, --focus --outline), + --label: props.get(core.$theme, --focus, --text), + --border: props.get(core.$theme, --focus, --border), + --outline: props.get(core.$theme, --focus, --outline), ), --primary: ( @@ -139,26 +139,29 @@ $static-themes: props.def(--o-button); )); } -$themes-config: accent negative !default; +$themes-config: ( + accent: --accent, + negative: --negative, +) !default; $themes: props.def(--o-button); -@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), - --outline-border: props.get(core.$theme, --#{$theme}, --900), - --outline-label: props.get(core.$theme, --#{$theme}, --1000), + --bg: props.get(core.$theme, #{$key}-static, --900), + --label: props.get(core.$theme, #{$key}-static, --900-text), + --outline-border: props.get(core.$theme, $key, --900), + --outline-label: props.get(core.$theme, $key, --1000), --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, --1100-text), + --bg: props.get(core.$theme, #{$key}-static, --1100), + --label: props.get(core.$theme, #{$key}-static, --1100-text), ), ) )); -- cgit v1.3.1