From 4ec6225a9273b8f0c93e4b3d93ecf1e1686b719c Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 4 Feb 2022 20:28:18 +0100 Subject: Fix errors from transition from node-sass to sass --- src/_harmony.scss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/_harmony.scss') diff --git a/src/_harmony.scss b/src/_harmony.scss index c3c8633..076fe55 100644 --- a/src/_harmony.scss +++ b/src/_harmony.scss @@ -8,6 +8,8 @@ /// @access public //// +@use 'sass:math'; + /// /// Adjust a value to a modular scale. /// @@ -23,7 +25,7 @@ /// @function iro-harmony-modular-scale($times, $base, $ratio) { @if type-of($base) == number { - @return $base * iro-math-pow($ratio, $times); + @return $base * math.pow($ratio, $times); } $main-base: nth($base, 1); @@ -32,7 +34,7 @@ @each $b in iro-list-slice($base, 2) { @if $b > $main-base { @while $b > $main-base { - $b: $b / $ratio; + $b: math.div($b, $ratio); } $b: $b * $ratio; } @else if $b < $main-base { @@ -48,9 +50,9 @@ $all-bases: iro-quicksort($all-bases); $base-index: $times % length($all-bases) + 1; - $exp: floor($times / length($all-bases)); + $exp: math.floor(math.div($times, length($all-bases))); - @return nth($all-bases, $base-index) * iro-math-pow($ratio, $exp); + @return nth($all-bases, $base-index) * math.pow($ratio, $exp); } /// -- cgit v1.2.3-54-g00ecf