From 398324f689e4fbb6fc9ba6982b0b3885f758c266 Mon Sep 17 00:00:00 2001 From: Petrik Date: Tue, 14 Jan 2025 17:17:41 +0100 Subject: [PATCH] Use "sass:math" for `floor` function Calling global `floor` is deprecated. This uses "sass:math" instead. --- scss/util/_math.scss | 2 +- scss/util/_mixins.scss | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scss/util/_math.scss b/scss/util/_math.scss index b0632b8793..8e7d949a5c 100644 --- a/scss/util/_math.scss +++ b/scss/util/_math.scss @@ -31,7 +31,7 @@ /// /// @returns {Number} The product of the exponentiation. @function pow($base, $exponent, $prec: 16) { - @if (floor($exponent) != $exponent) { + @if (math.floor($exponent) != $exponent) { $prec2: pow(10, $prec); $exponent: round($exponent * $prec2); $denominator: gcd($exponent, $prec2); diff --git a/scss/util/_mixins.scss b/scss/util/_mixins.scss index cb9f37d1d1..6d531b4915 100644 --- a/scss/util/_mixins.scss +++ b/scss/util/_mixins.scss @@ -7,6 +7,7 @@ //// @use "sass:color"; +@use "sass:math"; // Patch to fix issue #12080 $-zf-bp-value: null; @@ -96,7 +97,7 @@ $-zf-bp-value: null; $spacing: divide($height - ($weight * $bars), $bars - 1); @if unit($spacing) == 'px' { - $spacing: floor($spacing); + $spacing: math.floor($spacing); } @for $i from 2 through $bars {