Skip to content

Commit

Permalink
Merge pull request #190 from sprioleau/sprioleau/deprecated-division
Browse files Browse the repository at this point in the history
Fixes Sass division deprecation warning
Resolves #188
  • Loading branch information
Snugug committed Aug 14, 2022
2 parents 15f3125 + 80d395d commit 57edf29
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions stylesheets/breakpoint/_helpers.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
//////////////////////////////
// Converts the input value to Base EMs
//////////////////////////////

@use "sass:math";

@function breakpoint-to-base-em($value) {
$value-unit: unit($value);

Expand All @@ -25,16 +28,16 @@
$unit: unit($value);
@if $unit == 'px' {
@return $value / 16px * 1em;
@return math.div($value / 16px) * 1em;
}
@else if $unit == '%' {
@return $value / 100% * 1em;
@return math.div($value / 100%) * 1em;
}
@else if $unit == 'em' {
@return $value;
}
@else if $unit == 'pt' {
@return $value / 12pt * 1em;
@return math.div($value / 12pt) * 1em;
}
@else {
@return $value;
Expand Down

0 comments on commit 57edf29

Please sign in to comment.