]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Updates deprecated round functions 3940/head
authorCole Gentry <peapod2007@gmail.com>
Sun, 24 Nov 2024 16:44:39 +0000 (11:44 -0500)
committerCole Gentry <peapod2007@gmail.com>
Sun, 24 Nov 2024 16:44:39 +0000 (11:44 -0500)
Signed-off-by: Cole Gentry <peapod2007@gmail.com>
sass/utilities/css-variables.scss
sass/utilities/functions.scss

index 84c5c7ca281cc645efdc841eea47f8b2159dd4ed..79eaf0be0d3b5ba644c56a99bbad5f9dcab3598d 100644 (file)
 @mixin register-hsl($name, $value) {
   @include register-var(
     $name,
-    round(color.channel($value, "hue", $space: hsl)),
+    math.round(color.channel($value, "hue", $space: hsl)),
     "",
     "-h"
   );
   @include register-var(
     $name,
-    round(color.channel($value, "saturation", $space: hsl)),
+    math.round(color.channel($value, "saturation", $space: hsl)),
     "",
     "-s"
   );
   @include register-var(
     $name,
-    round(color.channel($value, "lightness", $space: hsl)),
+    math.round(color.channel($value, "lightness", $space: hsl)),
     "",
     "-l"
   );
   $light: null,
   $dark: null
 ) {
-  $h: round(color.channel($base, "hue", $space: hsl)); // Hue
-  $s: round(color.channel($base, "saturation", $space: hsl)); // Saturation
-  $l: round(color.channel($base, "lightness", $space: hsl)); // Lightness
+  $h:math.round(color.channel($base, "hue", $space: hsl)); // Hue
+  $s:math.round(color.channel($base, "saturation", $space: hsl)); // Saturation
+  $l:math.round(color.channel($base, "lightness", $space: hsl)); // Lightness
   $base-lum: fn.bulmaColorLuminance($base);
   $l-base: math.round($l % 10); // Get lightness second digit: 53% -> 3%
   $l-0: 0%; // 5% or less
index 21d29f5b2b9b854be256bd69d759d7ee047b3f47..2ea2b10a30a0cdc2dc20189fa72e19d6dc8ee7db 100644 (file)
   @if meta.type-of($color) == "color" {
     $luminance: bulmaColorLuminance($color);
     $luminance-delta: 0.53 - $luminance;
-    $target-l: round($base-l + $luminance-delta * 53);
+    $target-l: math.round($base-l + $luminance-delta * 53);
 
     @return color.change($color, $lightness: max($base-l, $target-l));
   }
 }
 
 @function bulmaColorBrightness($n) {
-  $color-brightness: round(
+  $color-brightness: math.round(
     math.div(
       (color.channel($n, "red", $space: rgb) * 299) +
         (color.channel($n, "green", $space: rgb) * 587) +
       1000
     )
   );
-  $light-color: round(
+  $light-color: math.round(
     math.div(
       (color.channel(#ffffff, "red", $space: rgb) * 299) +
         (color.channel(#ffffff, "green", $space: rgb) * 587) +