Skip to content

Commit 74b5a4d

Browse files
authored
Update some global Sass functions (#42271)
1 parent d6cf39f commit 74b5a4d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

scss/_functions.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@each $key, $num in $map {
2020
@if $prev-num == null or math.unit($num) == "%" or math.unit($prev-num) == "%" {
2121
// Do nothing
22-
} @else if not comparable($prev-num, $num) {
22+
} @else if not math.compatible($prev-num, $num) {
2323
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
2424
} @else if $prev-num >= $num {
2525
@warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";

scss/tests/mixins/_color-modes.test.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// stylelint-disable selector-attribute-quotes
22

3+
@use "sass:color";
4+
35
@import "../../colors";
46
@import "../../functions";
57
@import "../../config";
@@ -18,7 +20,7 @@
1820
}
1921
}
2022
@include color-mode(dark, true) {
21-
--custom-color: #{mix($indigo, $blue, 50%)};
23+
--custom-color: #{color.mix($indigo, $blue, 50%)};
2224
}
2325
}
2426
@include expect() {
@@ -47,7 +49,7 @@
4749
}
4850
}
4951
@include color-mode(dark, true) {
50-
--custom-color: #{mix($indigo, $blue, 50%)};
52+
--custom-color: #{color.mix($indigo, $blue, 50%)};
5153
}
5254
}
5355
@include expect() {

0 commit comments

Comments
 (0)