Skip to content

Commit 3902068

Browse files
committed
refactor: replace append() with list.append()
1 parent 709aefe commit 3902068

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

scss/functions/_maps.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:list";
12
@use "sass:map";
23
@use "sass:meta";
34
@use "../variables" as *;
@@ -11,7 +12,7 @@
1112
// allow to pass the $key and $value of the map as an function argument
1213
$_args: ();
1314
@each $arg in $args {
14-
$_args: append($_args, if($arg == "$prefix", $prefix, if($arg == "$key", $key, if($arg == "$value", $value, $arg))));
15+
$_args: list.append($_args, if($arg == "$prefix", $prefix, if($arg == "$key", $key, if($arg == "$value", $value, $arg))));
1516
}
1617

1718
$_map: map.merge($_map, ($key: meta.call(meta.get-function($func), $_args...)));

scss/mixins/_border-radius.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// stylelint-disable property-disallowed-list
2+
@use "sass:list";
23
@use "sass:meta";
34
@use "../variables" as *;
45
@use "ltr-rtl" as *;
@@ -10,9 +11,9 @@
1011
$return: ();
1112
@each $value in $radius {
1213
@if meta.type-of($value) == number {
13-
$return: append($return, max($value, 0));
14+
$return: list.append($return, max($value, 0));
1415
} @else {
15-
$return: append($return, $value);
16+
$return: list.append($return, $value);
1617
}
1718
}
1819
@return $return;

scss/mixins/_box-shadow.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:list";
12
@use "../variables" as *;
23

34
@mixin box-shadow($shadow...) {
@@ -6,7 +7,7 @@
67

78
@each $value in $shadow {
89
@if $value != null {
9-
$result: append($result, $value, "comma");
10+
$result: list.append($result, $value, "comma");
1011
}
1112
@if $value == none and length($shadow) > 1 {
1213
@warn "The keyword 'none' must be used as a single argument.";

scss/mixins/_utilities.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
// Multiple properties are possible, for example with vertical or horizontal margins or paddings
2727
@if meta.type-of($properties) == "string" {
28-
$properties: append((), $properties);
28+
$properties: list.append((), $properties);
2929
}
3030

3131
// Use custom class if present

0 commit comments

Comments
 (0)