From 48cb00040763459fc46d4aa108bf72c12f48f422 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 21 Jun 2024 23:07:50 +0200 Subject: WIP: Refactoring --- src/_utils.scss | 47 ++++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) (limited to 'src/_utils.scss') diff --git a/src/_utils.scss b/src/_utils.scss index d11a42c..e551136 100644 --- a/src/_utils.scss +++ b/src/_utils.scss @@ -1,13 +1,16 @@ +@use 'sass:map'; @use 'iro-sass/src/index' as iro; @use 'functions' as fn; @use 'include-media/dist/include-media' as media; $dirs: ( '': '', - 't': '-top', - 'r': '-right', - 'b': '-bottom', - 'l': '-left', + 'bs': '-block-start', + 'be': '-block-end', + 'b': '-block', + 'is': '-inline-start', + 'ie': '-inline-end', + 'i': '-inline', ); @include iro.bem-utility('d-block') { @@ -29,7 +32,7 @@ $dirs: ( @include iro.bem-utility('d-none') { display: none; - @each $breakpoint in map-keys(media.$breakpoints) { + @each $breakpoint in map.keys(media.$breakpoints) { @include media.media('<=#{$breakpoint}') { @include iro.bem-suffix('#{$breakpoint}-lo') { display: none; @@ -62,12 +65,12 @@ $dirs: ( } } -@include iro.bem-utility('ta-left') { - text-align: left; +@include iro.bem-utility('ta-start') { + text-align: start; } -@include iro.bem-utility('ta-right') { - text-align: right; +@include iro.bem-utility('ta-end') { + text-align: end; } @include iro.bem-utility('ta-center') { @@ -102,28 +105,23 @@ $dirs: ( justify-content: flex-end; } -@include iro.bem-utility('c-strong') { - color: fn.color(--fg-lo); +@include iro.bem-utility('c-heading') { + color: fn.color(--heading); } -@include iro.bem-utility('c-fg') { - color: fn.color(--fg); +@include iro.bem-utility('c-text') { + color: fn.color(--text); } -@include iro.bem-utility('c-muted') { - color: fn.color(--fg-hi); -} - -@include iro.bem-utility('c-muted-hi') { - color: fn.color(--fg-hi2); +@include iro.bem-utility('c-mute') { + color: fn.color(--text-mute); } @include iro.bem-utility('mt-neutralize') { &::before { content: ''; display: block; - margin-top: -100em; - margin-bottom: 100em; + margin-block: -100em 100em; } } @@ -170,11 +168,6 @@ $dirs: ( top: 0; } -@include iro.bem-utility('themed') { - background-color: fn.global-color(--bg); - color: fn.global-color(--fg); -} - @each $dir, $suffix in $dirs { @include iro.bem-utility('m#{$dir}-auto') { margin#{$suffix}: auto; @@ -199,6 +192,6 @@ $dirs: ( } @include iro.bem-utility('b#{$dir}-1') { - border#{$suffix}: 1px solid fn.global-color(--border --stable); + border#{$suffix}: 1px solid fn.global-color(--border); } } -- cgit v1.2.3-70-g09d2