From 6b0fcac695aa7a5517f6f53cec50da493acc4582 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 22 Jun 2024 19:30:00 +0200 Subject: Update --- src/objects/_palette.scss | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/objects/_palette.scss') diff --git a/src/objects/_palette.scss b/src/objects/_palette.scss index 9ecdfac..19f282f 100644 --- a/src/objects/_palette.scss +++ b/src/objects/_palette.scss @@ -7,8 +7,8 @@ @include iro.props-namespace('palette') { @include iro.bem-object(iro.props-namespace()) { - display: flex; - height: 3em; + display: flex; + block-size: 3em; @include iro.bem-elem('item') { flex: 1 1 auto; @@ -40,5 +40,23 @@ } } } + + @include iro.bem-modifier('static') { + @each $palette-name, $palette in map.get(config.$static-colors, --palettes) { + $contrasts: map.get(config.$static-colors, --contrasts); + + @include iro.bem-modifier(string.slice($palette-name, 3)) { + @include iro.bem-elem('item') { + @for $i from 1 through list.length($contrasts) { + $key: list.nth(map.keys($contrasts), $i); + + &:nth-child(#{$i}) { + background-color: fn.global-color(#{$palette-name}-static $key); + } + } + } + } + } + } } } -- cgit v1.2.3-54-g00ecf