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
6 lines
104 B
SCSS
6 lines
104 B
SCSS
@use "sass:math";
|
|
|
|
@function pow($base, $exponent, $prec: 16) {
|
|
@return math.pow($base, $exponent);
|
|
}
|