From 50f6acc739f24bfa2ca080d08e90d82f8fa83543 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 17 Oct 2024 16:45:00 +0200 Subject: Revamped variable management --- src/_functions.scss | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'src/_functions.scss') diff --git a/src/_functions.scss b/src/_functions.scss index 523aa84..4807cc1 100644 --- a/src/_functions.scss +++ b/src/_functions.scss @@ -7,31 +7,7 @@ @use 'iro-sass/src/index' as iro; @use 'iro-sass/src/easing' as easing; @use 'functions/colors' as iro-colors; -@use 'config'; - -@function color($key, $tree: iro.$props-default-tree, $default: null, $global: false) { - @return iro.props-get(list.join(--colors, $key), $tree, $default, $global); -} - -@function global-color($key, $tree: iro.$props-default-tree, $default: null, $global: true) { - @return color($key, $tree, $default, $global); -} - -@function foreign-color($foreign-key, $key, $tree: iro.$props-default-tree, $default: null, $global: true) { - @return iro.props-get(list.join($foreign-key --colors, $key), $tree, $default, $global); -} - -@function dim($key, $tree: iro.$props-default-tree, $default: null, $global: false) { - @return iro.props-get(list.join(--dims, $key), $tree, $default, $global); -} - -@function global-dim($key, $tree: iro.$props-default-tree, $default: null, $global: true) { - @return dim($key, $tree, $default, $global); -} - -@function foreign-dim($foreign-key, $key, $tree: iro.$props-default-tree, $default: null, $global: true) { - @return iro.props-get(list.join($foreign-key --dims, $key), $tree, $default, $global); -} +@use 'palettes'; @function font-prop($data, $overrides, $key, $prop) { @if (map.has-key($overrides, $prop)) { @@ -60,10 +36,6 @@ @return $map; } -@function lum($color) { - @return list.nth(blend-convert.lin_sRGB_to_XYZ(blend-convert.lin_sRGB(blend-convert.sassToRgb($color))), 2) + .05; -} - @function palette($base-color, $contrasts, $chroma-range: 1, $ref-color: $base-color) { $base-lch: color.to-space($base-color, oklch); $ref-lch: color.to-space($ref-color, oklch); @@ -82,7 +54,7 @@ $chroma-inv: true; $chroma-range: -1 * $chroma-range; } - $chroma-easing: meta.get-function(config.$palette-chroma-easing, $module: easing); + $chroma-easing: meta.get-function(palettes.$palette-chroma-easing, $module: easing); $palette: (); -- cgit v1.3.1