aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2026-01-21 11:27:04 +0100
committerVolpeon <git@volpeon.ink>2026-01-21 11:27:04 +0100
commit9df4a41f916389715d505730268459326068e9b6 (patch)
tree7a8cb45794dae8d5c75df35eda6e05d4661def4e
parentMake use of SASS modules (diff)
downloadiro-sass-9df4a41f916389715d505730268459326068e9b6.tar.gz
iro-sass-9df4a41f916389715d505730268459326068e9b6.tar.bz2
iro-sass-9df4a41f916389715d505730268459326068e9b6.zip
Fix SASS deprecation warning for if()HEADmaster
-rw-r--r--src/_contexts.scss3
-rw-r--r--src/_functions.scss10
-rw-r--r--src/bem/_multi.scss2
3 files changed, 8 insertions, 7 deletions
diff --git a/src/_contexts.scss b/src/_contexts.scss
index ed376a2..e766321 100644
--- a/src/_contexts.scss
+++ b/src/_contexts.scss
@@ -241,7 +241,8 @@ $stacks: ();
241 @return false; 241 @return false;
242 } 242 }
243 243
244 $end-idx: if($check-head-only, list.length($context-stack), 1); 244 $end-idx: if(sass($check-head-only): list.length($context-stack); else: 1);
245
245 246
246 @for $i from list.length($context-stack) through $end-idx { 247 @for $i from list.length($context-stack) through $end-idx {
247 $context: list.nth($context-stack, $i); 248 $context: list.nth($context-stack, $i);
diff --git a/src/_functions.scss b/src/_functions.scss
index 74cc1b5..ac6f745 100644
--- a/src/_functions.scss
+++ b/src/_functions.scss
@@ -67,7 +67,7 @@ $units: (
67 $result: ''; 67 $result: '';
68 68
69 @each $item in $list { 69 @each $item in $list {
70 $result: $result + if(list.length($item) > 1, str-implode($item, $glue), $item); 70 $result: $result + if(sass(list.length($item) > 1): str-implode($item, $glue); else: $item);
71 71
72 @if $item != list.nth($list, list.length($list)) { 72 @if $item != list.nth($list, list.length($list)) {
73 $result: $result + $glue; 73 $result: $result + $glue;
@@ -211,7 +211,7 @@ $units: (
211 $default: list.nth($keys, list.length($keys)); 211 $default: list.nth($keys, list.length($keys));
212 $keys: list-slice($keys, 1, list.length($keys) - 1); 212 $keys: list-slice($keys, 1, list.length($keys) - 1);
213 213
214 @return if(map.has-key($map, $key, $keys...), map.get($map, $key, $keys...), $default); 214 @return if(sass(map.has-key($map, $key, $keys...)): map.get($map, $key, $keys...); else: $default);
215} 215}
216 216
217/// 217///
@@ -329,11 +329,11 @@ $units: (
329 $digits: 0; 329 $digits: 0;
330 $minus: string.slice($value, 1, 1) == '-'; 330 $minus: string.slice($value, 1, 1) == '-';
331 331
332 @for $i from if($minus, 2, 1) through string.length($value) { 332 @for $i from if(sass($minus): 2; else: 1) through string.length($value) {
333 $character: string.slice($value, $i, $i); 333 $character: string.slice($value, $i, $i);
334 334
335 @if not list.index(map.keys($numbers), $character) and $character != '.' { 335 @if not list.index(map.keys($numbers), $character) and $character != '.' {
336 @return to-length(if($minus, -$result, $result), string.slice($value, $i)); 336 @return to-length(if(sass($minus): -$result; else: $result), string.slice($value, $i));
337 } 337 }
338 338
339 @if $character == '.' { 339 @if $character == '.' {
@@ -346,7 +346,7 @@ $units: (
346 } 346 }
347 } 347 }
348 348
349 @return if($minus, -$result, $result); 349 @return if(sass($minus): -$result; else: $result);
350} 350}
351 351
352/// 352///
diff --git a/src/bem/_multi.scss b/src/bem/_multi.scss
index c0beeeb..21a72ab 100644
--- a/src/bem/_multi.scss
+++ b/src/bem/_multi.scss
@@ -97,7 +97,7 @@
97 } 97 }
98 98
99 @if $is-manual-selector { 99 @if $is-manual-selector {
100 $sel: if(&, selector.nest(&, $entity), selector.parse($entity)); 100 $sel: if(sass(&): selector.nest(&, $entity); else: selector.parse($entity));
101 101
102 @at-root #{$sel} { 102 @at-root #{$sel} {
103 @content; 103 @content;