From 4c88538c4d267de7cd21cc29c07e7c8360145441 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 25 Oct 2024 19:04:07 +0200 Subject: New palette generation --- src/objects/_palette.scss | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/objects') diff --git a/src/objects/_palette.scss b/src/objects/_palette.scss index 6fbe153..8a6cdb2 100644 --- a/src/objects/_palette.scss +++ b/src/objects/_palette.scss @@ -14,11 +14,11 @@ @include bem.elem('item') { flex: 1 1 auto; - $palette: map.get(config.$themes, config.$theme-default, light, --palettes, --base); - $contrasts: map.get(config.$themes, config.$theme-default, light, --contrasts, list.nth($palette, 2)); + $palette: map.get(config.$themes, config.$theme-default, light, --palettes, --base); + $levels: map.get(config.$themes, config.$theme-default, light, --levels, list.nth($palette, 2)); - @for $i from 1 through list.length($contrasts) { - $key: list.nth(map.keys($contrasts), $i); + @for $i from 1 through list.length($levels) { + $key: list.nth(map.keys($levels), $i); &:nth-child(#{$i}) { background-color: props.get(core.$theme, --base, $key); @@ -27,12 +27,12 @@ } @each $palette-name, $palette in map.get(config.$themes, config.$theme-default, light, --palettes) { - $contrasts: map.get(config.$themes, config.$theme-default, light, --contrasts, list.nth($palette, 2)); + $levels: map.get(config.$themes, config.$theme-default, light, --levels, list.nth($palette, 2)); @include bem.modifier(string.slice($palette-name, 3)) { @include bem.elem('item') { - @for $i from 1 through list.length($contrasts) { - $key: list.nth(map.keys($contrasts), $i); + @for $i from 1 through list.length($levels) { + $key: list.nth(map.keys($levels), $i); &:nth-child(#{$i}) { background-color: props.get(core.$theme, $palette-name, $key); @@ -44,12 +44,12 @@ @include bem.modifier('static') { @each $palette-name, $palette in map.get(config.$static-colors, --palettes) { - $contrasts: map.get(config.$static-colors, --contrasts); + $levels: map.get(config.$static-colors, --levels); @include bem.modifier(string.slice($palette-name, 3)) { @include bem.elem('item') { - @for $i from 1 through list.length($contrasts) { - $key: list.nth(map.keys($contrasts), $i); + @for $i from 1 through list.length($levels) { + $key: list.nth(map.keys($levels), $i); &:nth-child(#{$i}) { background-color: props.get(core.$theme, #{$palette-name}-static, $key); -- cgit v1.2.3-70-g09d2