From 5b844ed97115823d16c7894d9f956c7125d3d7b3 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 16 Oct 2024 09:04:19 +0200 Subject: Enable config override --- src/_config.scss | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/_config.scss b/src/_config.scss index 8ed8162..6725448 100644 --- a/src/_config.scss +++ b/src/_config.scss @@ -28,7 +28,8 @@ $palette-precision: .01 !default; $palette-chroma-easing: 'ease' !default; -$static-colors: ( +$static-colors-override: () !default; +$static-colors: map.deep-merge(( --base: hsl(0, 0%, 98%), --contrasts: ( @@ -66,9 +67,10 @@ $static-colors: ( --800: .9, --900: 1, ), -) !default; +), $static-colors-override); -$semantic-colors-common: ( +$semantic-colors-common-override: () !default; +$semantic-colors-common: map.deep-merge(( --accent: --blue, --accent-static: --blue-static, --positive: --green, @@ -99,9 +101,10 @@ $semantic-colors-common: ( --border-strong: --focus-raw --1100, --text: --focus-raw --1100, ), -) !default; +), $semantic-colors-common-override); -$theme-light: ( +$theme-light-override: () !default; +$theme-light: map.deep-merge(( --contrasts: ( --grays: ( --50: -8, @@ -159,9 +162,10 @@ $theme-light: ( --constants: ( --shadow: rgba(#000, .15), ), -) !default; +), $theme-light-override); -$theme-dark: ( +$theme-dark-override: () !default; +$theme-dark: map.deep-merge(( --contrasts: ( --grays: ( --50: 4.4, @@ -197,12 +201,12 @@ $theme-dark: ( ), --ranges: ( - --full: .5, + --full: 1, --muted: .3, ), --palettes: ( - --base: hsl(257, 13%, 19.5%) --grays --full, + --base: hsl(257, 7%, 19%) --grays --full, --blue: oklch(56% .16 265.25) --colors --muted, --purple: oklch(56% .16 305.58) --colors --muted, --red: oklch(56% .16 18.69) --colors --muted, @@ -219,11 +223,12 @@ $theme-dark: ( --constants: ( --shadow: rgba(#000, .5), ), -) !default; +), $theme-dark-override); -$themes: ( +$themes-override: () !default; +$themes: map.deep-merge(( light: $theme-light, dark: $theme-dark, -) !default; +), $themes-override); $theme-default: list.nth(map.keys($themes), 1) !default; -- cgit v1.2.3-70-g09d2