]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Update some global Sass functions (#42271)
authorMark Otto <markd.otto@gmail.com>
Sat, 4 Apr 2026 05:17:23 +0000 (22:17 -0700)
committerGitHub <noreply@github.com>
Sat, 4 Apr 2026 05:17:23 +0000 (22:17 -0700)
scss/_functions.scss
scss/tests/mixins/_color-modes.test.scss

index a610d61468090d77e375fbbcd8a27a68f6d029a4..9c9b1ac742395dd41c2620da7e372a8ddccb7688 100644 (file)
@@ -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}' !";
index ab55cde714fa5106ef7832055a8b1531c6b0cd97..d3a5e18c5332e59f4604fba15f7a18c85e0293b1 100644 (file)
@@ -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() {