Override Foundation's pow() function

Foundation added compatibility with Dart Sass by implementing a `divide`
function and using it instead of `/` to perform divisions [1]. However,
this made CSS compilation much slower, with the cause being the usage of
the `divide` function inside Foundation's recursive `nth-root` and `pow`
functions. Since the `nth-root` function is only called by the `pow`
function, overriding the `pow` function so it uses the `math.pow`
function provided by Dart Sass solves the issue.

[1] Pull request 12241 in https://github.com/foundation/foundation-sites
This commit is contained in:
Javi Martín
2024-04-01 23:34:29 +02:00
parent 2b98571bc5
commit 39c4d0c6d4

View File

@@ -0,0 +1,5 @@
@use "sass:math";
@function pow($base, $exponent, $prec: 16) {
@return math.pow($base, $exponent);
}