From e0815613914e16d73a30efe709a74b994cc31963 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 25 Oct 2024 19:37:52 +0200 Subject: More efficient theming --- src/scopes/_blockquotes.vars.scss | 2 +- src/scopes/_code.vars.scss | 8 ++++---- src/scopes/_implicit.vars.scss | 2 +- src/scopes/_links.vars.scss | 22 +++++++++++----------- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/scopes') diff --git a/src/scopes/_blockquotes.vars.scss b/src/scopes/_blockquotes.vars.scss index f0b0484..9db1271 100644 --- a/src/scopes/_blockquotes.vars.scss +++ b/src/scopes/_blockquotes.vars.scss @@ -8,4 +8,4 @@ $border-width: props.def(--s-blockquotes--border-width, props.get(core.$border-w $compact--indent: props.def(--s-blockquotes--compact--indent, props.get(core.$list--compact-indent)) !default; -$border-color: props.def(--s-blockquotes--border-color, props.get(core.$theme, --border)) !default; +$border-color: props.def(--s-blockquotes--border-color, props.get(core.$theme, --border), 'color') !default; diff --git a/src/scopes/_code.vars.scss b/src/scopes/_code.vars.scss index 581347c..c1bf27c 100644 --- a/src/scopes/_code.vars.scss +++ b/src/scopes/_code.vars.scss @@ -11,8 +11,8 @@ $block--pad-b: props.def(--s-code--block--pad-b, props.get(core.$size--85)) $block--margin-bs: props.def(--s-code--block--margin-bs, props.get(implicit.$paragraph--margin-bs)) !default; $block--rounding: props.def(--s-code--block--rounding, props.get(core.$rounding)) !default; -$inline--fg: props.def(--s-code--inline--fg, props.get(core.$theme, --red, --1200)) !default; -$inline--bg: props.def(--s-code--inline--bg, props.get(core.$theme, --red, --200)) !default; +$inline--fg: props.def(--s-code--inline--fg, props.get(core.$theme, --red, --1200), 'color') !default; +$inline--bg: props.def(--s-code--inline--bg, props.get(core.$theme, --red, --200), 'color') !default; -$block--fg: props.def(--s-code--block--fg, props.get(core.$theme, --text)) !default; -$block--bg: props.def(--s-code--block--bg, props.get(core.$theme, --base, --50)) !default; +$block--fg: props.def(--s-code--block--fg, props.get(core.$theme, --text), 'color') !default; +$block--bg: props.def(--s-code--block--bg, props.get(core.$theme, --base, --50), 'color') !default; diff --git a/src/scopes/_implicit.vars.scss b/src/scopes/_implicit.vars.scss index 0b0f326..0002591 100644 --- a/src/scopes/_implicit.vars.scss +++ b/src/scopes/_implicit.vars.scss @@ -23,4 +23,4 @@ $heading--font-weight: props.def(--s-implicit--heading--font-weight, props $heading--font-size: props.def(--s-implicit--heading--font-size, props.get(core.$font-size--100)); $heading--feature-settings: props.def(--s-implicit--heading--feature-settings, props.get(core.$font--headline--feature-settings)) !default; -$heading--color: props.def(--s-implicit--heading--color, props.get(core.$theme, --heading)); +$heading--color: props.def(--s-implicit--heading--color, props.get(core.$theme, --heading), 'color'); diff --git a/src/scopes/_links.vars.scss b/src/scopes/_links.vars.scss index 7fae0c9..91a73ab 100644 --- a/src/scopes/_links.vars.scss +++ b/src/scopes/_links.vars.scss @@ -11,21 +11,21 @@ $key-focus--border-width: props.def(--s-links--key-focus--border-width, props.g $key-focus--border-offset: props.def(--s-links--key-focus--border-offset, props.get(core.$key-focus--border-offset)) !default; $key-focus--outline-width: props.def(--s-links--key-focus--outline-width, props.get(core.$key-focus--outline-width)) !default; -$underline-color: props.def(--s-links--underline-color, props.get(core.$theme, --text-mute-more)) !default; +$underline-color: props.def(--s-links--underline-color, props.get(core.$theme, --text-mute-more), 'color') !default; -$colored--text-color: props.def(--s-links--colored--text-color, props.get(core.$theme, --accent, --1100)) !default; -$colored--underline-color: props.def(--s-links--colored--underline-color, props.get(core.$theme, --accent, --600)) !default; -$colored--hover--text-color: props.def(--s-links--colored--hover--text-color, props.get(core.$theme, --accent, --1300)) !default; +$colored--text-color: props.def(--s-links--colored--text-color, props.get(core.$theme, --accent, --1100), 'color') !default; +$colored--underline-color: props.def(--s-links--colored--underline-color, props.get(core.$theme, --accent, --600), 'color') !default; +$colored--hover--text-color: props.def(--s-links--colored--hover--text-color, props.get(core.$theme, --accent, --1300), 'color') !default; -$colored--visited--text-color: props.def(--s-links--colored--visited--text-color, props.get(core.$theme, --purple, --1100)) !default; -$colored--visited--underline-color: props.def(--s-links--colored--visited--underline-color, props.get(core.$theme, --purple, --600)) !default; -$colored--visited--hover--text-color: props.def(--s-links--colored--visited--hover--text-color, props.get(core.$theme, --purple, --1300)) !default; +$colored--visited--text-color: props.def(--s-links--colored--visited--text-color, props.get(core.$theme, --purple, --1100), 'color') !default; +$colored--visited--underline-color: props.def(--s-links--colored--visited--underline-color, props.get(core.$theme, --purple, --600), 'color') !default; +$colored--visited--hover--text-color: props.def(--s-links--colored--visited--hover--text-color, props.get(core.$theme, --purple, --1300), 'color') !default; -$key-focus--text-color: props.def(--s-links--key-focus--text-color, props.get(core.$theme, --focus, --text)) !default; -$key-focus--border-color: props.def(--s-links--key-focus--border-color, props.get(core.$theme, --focus, --border)) !default; -$key-focus--outline-color: props.def(--s-links--key-focus--outline-color, props.get(core.$theme, --focus, --outline)) !default; +$key-focus--text-color: props.def(--s-links--key-focus--text-color, props.get(core.$theme, --focus, --text), 'color') !default; +$key-focus--border-color: props.def(--s-links--key-focus--border-color, props.get(core.$theme, --focus, --border), 'color') !default; +$key-focus--outline-color: props.def(--s-links--key-focus--outline-color, props.get(core.$theme, --focus, --outline), 'color') !default; -$static-themes: props.def(--s-links); +$static-themes: props.def(--s-links, (), 'color'); @each $theme in map.keys(props.get(core.$transparent-colors)) { $link-theme: --static-#{string.slice($theme, 3)}; -- cgit v1.2.3-70-g09d2