-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(@clayui/css): Adds division polyfill
clay-div
a function that u…
…ses `/` as a division operation if the function `div()` does not exist Dart Sass 1.33.0 changed `/` from a division operation to a list separator. Clay CSS will default to to using `/` as a division operation unless `@use 'sass:math' as *;` is declared to load the math module. fix(@clayui/css): Convert `/` to `clay-div` where CSS `calc` or multiplication isn't possible
- Loading branch information
Showing
7 changed files
with
52 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//// | ||
/// @group polyfills | ||
//// | ||
|
||
/// A function that uses `/` as a division operation if the function `div()` does not exist. Dart Sass 1.33.0 changed `/` from a division operation to a list separator. Clay CSS will default to to using `/` as a division operation unless `@use 'sass:math' as *;` is declared to load the math module. | ||
/// @param {Number} $numerator - The number to divide or dividend | ||
/// @param {Number} $denominator - The number that divides the $numerator or divisor | ||
|
||
@function clay-div($numerator, $denominator) { | ||
$division-function: if( | ||
function-exists(div), | ||
div($numerator, $denominator), | ||
$numerator / $denominator | ||
); | ||
|
||
@return $division-function; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters