diff options
Diffstat (limited to 'src/_utils.scss')
-rw-r--r-- | src/_utils.scss | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/src/_utils.scss b/src/_utils.scss index e90aa57..445e5c6 100644 --- a/src/_utils.scss +++ b/src/_utils.scss | |||
@@ -1,4 +1,5 @@ | |||
1 | @use 'sass:map'; | 1 | @use 'sass:map'; |
2 | @use 'sass:string'; | ||
2 | @use 'iro-sass/src/bem'; | 3 | @use 'iro-sass/src/bem'; |
3 | @use 'iro-sass/src/props'; | 4 | @use 'iro-sass/src/props'; |
4 | @use 'include-media/dist/include-media' as media; | 5 | @use 'include-media/dist/include-media' as media; |
@@ -9,12 +10,12 @@ | |||
9 | /* stylelint-disable-next-line scss/dollar-variable-pattern */ | 10 | /* stylelint-disable-next-line scss/dollar-variable-pattern */ |
10 | $-dirs: ( | 11 | $-dirs: ( |
11 | '': '', | 12 | '': '', |
13 | 'b': '-block', | ||
12 | 'bs': '-block-start', | 14 | 'bs': '-block-start', |
13 | 'be': '-block-end', | 15 | 'be': '-block-end', |
14 | 'b': '-block', | 16 | 'i': '-inline', |
15 | 'is': '-inline-start', | 17 | 'is': '-inline-start', |
16 | 'ie': '-inline-end', | 18 | 'ie': '-inline-end', |
17 | 'i': '-inline', | ||
18 | ) !default; | 19 | ) !default; |
19 | 20 | ||
20 | /* stylelint-disable-next-line scss/dollar-variable-pattern */ | 21 | /* stylelint-disable-next-line scss/dollar-variable-pattern */ |
@@ -132,6 +133,10 @@ $-sizes: ( | |||
132 | align-items: flex-end; | 133 | align-items: flex-end; |
133 | } | 134 | } |
134 | 135 | ||
136 | @include bem.utility('ac-center') { | ||
137 | align-content: center; | ||
138 | } | ||
139 | |||
135 | @include bem.utility('jc-center') { | 140 | @include bem.utility('jc-center') { |
136 | justify-content: center; | 141 | justify-content: center; |
137 | } | 142 | } |
@@ -154,18 +159,50 @@ $-sizes: ( | |||
154 | 159 | ||
155 | @include bem.utility('c-heading') { | 160 | @include bem.utility('c-heading') { |
156 | color: props.get(vars.$theme, --heading); | 161 | color: props.get(vars.$theme, --heading); |
162 | |||
163 | @each $theme in map.keys(props.get(vars.$transparent-colors)) { | ||
164 | $theme-name: static-#{string.slice($theme, 3)}; | ||
165 | |||
166 | @include bem.at-theme($theme-name) { | ||
167 | color: props.get(vars.$transparent-colors, $theme, --900); | ||
168 | } | ||
169 | } | ||
157 | } | 170 | } |
158 | 171 | ||
159 | @include bem.utility('c-text') { | 172 | @include bem.utility('c-text') { |
160 | color: props.get(vars.$theme, --text); | 173 | color: props.get(vars.$theme, --text); |
174 | |||
175 | @each $theme in map.keys(props.get(vars.$transparent-colors)) { | ||
176 | $theme-name: static-#{string.slice($theme, 3)}; | ||
177 | |||
178 | @include bem.at-theme($theme-name) { | ||
179 | color: props.get(vars.$transparent-colors, $theme, --800); | ||
180 | } | ||
181 | } | ||
161 | } | 182 | } |
162 | 183 | ||
163 | @include bem.utility('c-mute') { | 184 | @include bem.utility('c-mute') { |
164 | color: props.get(vars.$theme, --text-mute); | 185 | color: props.get(vars.$theme, --text-mute); |
186 | |||
187 | @each $theme in map.keys(props.get(vars.$transparent-colors)) { | ||
188 | $theme-name: static-#{string.slice($theme, 3)}; | ||
189 | |||
190 | @include bem.at-theme($theme-name) { | ||
191 | color: props.get(vars.$transparent-colors, $theme, --700); | ||
192 | } | ||
193 | } | ||
165 | } | 194 | } |
166 | 195 | ||
167 | @include bem.utility('c-mute-more') { | 196 | @include bem.utility('c-mute-more') { |
168 | color: props.get(vars.$theme, --text-mute-more); | 197 | color: props.get(vars.$theme, --text-mute-more); |
198 | |||
199 | @each $theme in map.keys(props.get(vars.$transparent-colors)) { | ||
200 | $theme-name: static-#{string.slice($theme, 3)}; | ||
201 | |||
202 | @include bem.at-theme($theme-name) { | ||
203 | color: props.get(vars.$transparent-colors, $theme, --600); | ||
204 | } | ||
205 | } | ||
169 | } | 206 | } |
170 | 207 | ||
171 | @each $dir, $prop in (is: inline-size, bs: block-size) { | 208 | @each $dir, $prop in (is: inline-size, bs: block-size) { |