From: Mark Otto Date: Sat, 4 Apr 2026 05:17:23 +0000 (-0700) Subject: Update some global Sass functions (#42271) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=74b5a4d8f7b97adad912aa612a5dce1afe551b50;p=thirdparty%2Fbootstrap.git Update some global Sass functions (#42271) --- diff --git a/scss/_functions.scss b/scss/_functions.scss index a610d61468..9c9b1ac742 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -19,7 +19,7 @@ @each $key, $num in $map { @if $prev-num == null or math.unit($num) == "%" or math.unit($prev-num) == "%" { // Do nothing - } @else if not comparable($prev-num, $num) { + } @else if not math.compatible($prev-num, $num) { @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}' !"; } @else if $prev-num >= $num { @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}' !"; diff --git a/scss/tests/mixins/_color-modes.test.scss b/scss/tests/mixins/_color-modes.test.scss index ab55cde714..d3a5e18c53 100644 --- a/scss/tests/mixins/_color-modes.test.scss +++ b/scss/tests/mixins/_color-modes.test.scss @@ -1,5 +1,7 @@ // stylelint-disable selector-attribute-quotes +@use "sass:color"; + @import "../../colors"; @import "../../functions"; @import "../../config"; @@ -18,7 +20,7 @@ } } @include color-mode(dark, true) { - --custom-color: #{mix($indigo, $blue, 50%)}; + --custom-color: #{color.mix($indigo, $blue, 50%)}; } } @include expect() { @@ -47,7 +49,7 @@ } } @include color-mode(dark, true) { - --custom-color: #{mix($indigo, $blue, 50%)}; + --custom-color: #{color.mix($indigo, $blue, 50%)}; } } @include expect() {