Merge pull request #3940 from SomethingNew71/sass-deprecation-fix

Updates deprecated round functions in Sass Build
This commit is contained in:
Jeremy Thomas 2024-11-27 15:47:28 +00:00 committed by GitHub
commit 4ebf14b538
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 9 deletions

View File

@ -61,19 +61,19 @@
@mixin register-hsl($name, $value) { @mixin register-hsl($name, $value) {
@include register-var( @include register-var(
$name, $name,
round(color.channel($value, "hue", $space: hsl)), math.round(color.channel($value, "hue", $space: hsl)),
"", "",
"-h" "-h"
); );
@include register-var( @include register-var(
$name, $name,
round(color.channel($value, "saturation", $space: hsl)), math.round(color.channel($value, "saturation", $space: hsl)),
"", "",
"-s" "-s"
); );
@include register-var( @include register-var(
$name, $name,
round(color.channel($value, "lightness", $space: hsl)), math.round(color.channel($value, "lightness", $space: hsl)),
"", "",
"-l" "-l"
); );
@ -196,9 +196,9 @@
$light: null, $light: null,
$dark: null $dark: null
) { ) {
$h: round(color.channel($base, "hue", $space: hsl)); // Hue $h:math.round(color.channel($base, "hue", $space: hsl)); // Hue
$s: round(color.channel($base, "saturation", $space: hsl)); // Saturation $s:math.round(color.channel($base, "saturation", $space: hsl)); // Saturation
$l: round(color.channel($base, "lightness", $space: hsl)); // Lightness $l:math.round(color.channel($base, "lightness", $space: hsl)); // Lightness
$base-lum: fn.bulmaColorLuminance($base); $base-lum: fn.bulmaColorLuminance($base);
$l-base: math.round($l % 10); // Get lightness second digit: 53% -> 3% $l-base: math.round($l % 10); // Get lightness second digit: 53% -> 3%
$l-0: 0%; // 5% or less $l-0: 0%; // 5% or less

View File

@ -159,7 +159,7 @@
@if meta.type-of($color) == "color" { @if meta.type-of($color) == "color" {
$luminance: bulmaColorLuminance($color); $luminance: bulmaColorLuminance($color);
$luminance-delta: 0.53 - $luminance; $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)); @return color.change($color, $lightness: max($base-l, $target-l));
} }
@ -192,7 +192,7 @@
} }
@function bulmaColorBrightness($n) { @function bulmaColorBrightness($n) {
$color-brightness: round( $color-brightness: math.round(
math.div( math.div(
(color.channel($n, "red", $space: rgb) * 299) + (color.channel($n, "red", $space: rgb) * 299) +
(color.channel($n, "green", $space: rgb) * 587) + (color.channel($n, "green", $space: rgb) * 587) +
@ -200,7 +200,7 @@
1000 1000
) )
); );
$light-color: round( $light-color: math.round(
math.div( math.div(
(color.channel(#ffffff, "red", $space: rgb) * 299) + (color.channel(#ffffff, "red", $space: rgb) * 299) +
(color.channel(#ffffff, "green", $space: rgb) * 587) + (color.channel(#ffffff, "green", $space: rgb) * 587) +