From 3acab34ebc6be309620892de914bd9827d756eae Mon Sep 17 00:00:00 2001 From: Petrik Date: Tue, 14 Jan 2025 16:34:26 +0100 Subject: [PATCH] Use "sass:list" for append functions Calling globalb `append` is deprecated. This uses "sass:list" instead. --- scss/util/_breakpoint.scss | 4 +++- scss/util/_color.scss | 3 ++- scss/util/_mixins.scss | 5 +++-- scss/util/_selector.scss | 4 +++- scss/util/_unit.scss | 3 ++- scss/util/_value.scss | 6 ++++-- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/scss/util/_breakpoint.scss b/scss/util/_breakpoint.scss index c8fa336d56..6e5b1ff83e 100644 --- a/scss/util/_breakpoint.scss +++ b/scss/util/_breakpoint.scss @@ -6,6 +6,8 @@ /// @group breakpoints //// +@use "sass:list"; + /// Patch to fix issue #12080 $-zf-size: null; @@ -274,7 +276,7 @@ $breakpoint-classes: (small medium large) !default; $found-key: true; } @if not $found-key { - $list: append($list, $name); + $list: list.append($list, $name); } } @return $list; diff --git a/scss/util/_color.scss b/scss/util/_color.scss index ea527bf735..33ae3d57d0 100644 --- a/scss/util/_color.scss +++ b/scss/util/_color.scss @@ -3,6 +3,7 @@ // Licensed under MIT Open Source @use "sass:color"; +@use "sass:list"; @import 'math'; $contrast-warnings: true !default; @@ -39,7 +40,7 @@ $success-color: null !default; $rgb: if($rgb < 0.03928, divide($rgb, 12.92), pow(divide($rgb + 0.055, 1.055), 2.4)); - $rgba2: append($rgba2, $rgb); + $rgba2: list.append($rgba2, $rgb); } @return 0.2126 * nth($rgba2, 1) + 0.7152 * nth($rgba2, 2) + 0.0722 * nth($rgba2, 3); diff --git a/scss/util/_mixins.scss b/scss/util/_mixins.scss index cb9f37d1d1..cd1aa267c8 100644 --- a/scss/util/_mixins.scss +++ b/scss/util/_mixins.scss @@ -7,6 +7,7 @@ //// @use "sass:color"; +@use "sass:list"; // Patch to fix issue #12080 $-zf-bp-value: null; @@ -101,7 +102,7 @@ $-zf-bp-value: null; @for $i from 2 through $bars { $offset: ($weight + $spacing) * ($i - 1); - $shadow: append($shadow, 0 $offset 0 $color, comma); + $shadow: list.append($shadow, 0 $offset 0 $color, comma); } // Icon container @@ -133,7 +134,7 @@ $-zf-bp-value: null; // Generate CSS @for $i from 2 through $bars { $offset: ($weight + $spacing) * ($i - 1); - $hover-shadow: append($hover-shadow, 0 $offset 0 $color-hover, comma); + $hover-shadow: list.append($hover-shadow, 0 $offset 0 $color-hover, comma); } &:hover::after { diff --git a/scss/util/_selector.scss b/scss/util/_selector.scss index dfe4c77804..3f2ed95cf2 100644 --- a/scss/util/_selector.scss +++ b/scss/util/_selector.scss @@ -6,6 +6,8 @@ /// @group functions //// +@use "sass:list"; + /// Generates a selector with every text input type. You can also filter the list to only output a subset of those selectors. /// /// @param {List|Keyword} $types [()] - A list of text input types to use. Leave blank to use all of them. @@ -20,7 +22,7 @@ } @each $type in $types { - $return: append($return, unquote('[type=\'#{$type}\']#{$modifier}'), comma); + $return: list.append($return, unquote('[type=\'#{$type}\']#{$modifier}'), comma); } @return $return; diff --git a/scss/util/_unit.scss b/scss/util/_unit.scss index 75e0b13ab2..6755c2f088 100644 --- a/scss/util/_unit.scss +++ b/scss/util/_unit.scss @@ -2,6 +2,7 @@ // https://get.foundation // Licensed under MIT Open Source +@use "sass:list"; @import 'math'; $unit-warnings: true !default; @@ -52,7 +53,7 @@ $global-font-size: 100% !default; } @for $i from 1 through $count { - $rem-values: append($rem-values, -zf-to-rem(nth($values, $i), $base)); + $rem-values: list.append($rem-values, -zf-to-rem(nth($values, $i), $base)); } @return $rem-values; diff --git a/scss/util/_value.scss b/scss/util/_value.scss index 419dbf33ea..fbe6da5fc0 100644 --- a/scss/util/_value.scss +++ b/scss/util/_value.scss @@ -2,6 +2,8 @@ // https://get.foundation // Licensed under MIT Open Source +@use "sass:list"; + //// /// @group functions //// @@ -105,8 +107,8 @@ $values: (); @each $key, $val in $map { - $keys: append($keys, $key); - $values: append($values, $val); + $keys: list.append($keys, $key); + $values: list.append($values, $val); } @if $keep == 'keys' {