diff --git a/stylesheets/breakpoint/_helpers.scss b/stylesheets/breakpoint/_helpers.scss index f0d567c..b34f4f7 100644 --- a/stylesheets/breakpoint/_helpers.scss +++ b/stylesheets/breakpoint/_helpers.scss @@ -12,7 +12,7 @@ $base-unit: unit(breakpoint-get('base font size')); @if $base-unit == 'px' or $base-unit == '%' or $base-unit == 'em' or $base-unit == 'pt' { - @return base-conversion($value) / base-conversion(breakpoint-get('base font size')) * 1em; + @return math.div(base-conversion($value), base-conversion(breakpoint-get('base font size'))) * 1em; } @else { @warn '#{breakpoint-get(\'base font size\')} is not set in valid units for font size!'; @@ -28,16 +28,16 @@ $unit: unit($value); @if $unit == 'px' { - @return math.div($value / 16px) * 1em; + @return math.div($value, 16px) * 1em; } @else if $unit == '%' { - @return math.div($value / 100%) * 1em; + @return math.div($value, 100%) * 1em; } @else if $unit == 'em' { @return $value; } @else if $unit == 'pt' { - @return math.div($value / 12pt) * 1em; + @return math.div($value, 12pt) * 1em; } @else { @return $value; diff --git a/stylesheets/breakpoint/parsers/resolution/_resolution.scss b/stylesheets/breakpoint/parsers/resolution/_resolution.scss index 3680421..205e25c 100644 --- a/stylesheets/breakpoint/parsers/resolution/_resolution.scss +++ b/stylesheets/breakpoint/parsers/resolution/_resolution.scss @@ -1,3 +1,5 @@ +@use "sass:math"; + @function breakpoint-make-resolutions($resolution) { $length: length($resolution); @@ -34,8 +36,8 @@ // Write out feature tests $webkit: ''; $moz: ''; - $webkit: '(-webkit-#{$feature}device-pixel-ratio: #{$value / $base})'; - $moz: '(#{$feature}-moz-device-pixel-ratio: #{$value / $base})'; + $webkit: '(-webkit-#{$feature}device-pixel-ratio: #{math.div($value, $base)})'; + $moz: '(#{$feature}-moz-device-pixel-ratio: #{math.div($value, $base)})'; // Append to output $output: append($output, $standard, space); $output: append($output, $webkit, space); @@ -44,9 +46,9 @@ @else { $webkit: ''; $moz: ''; - $webkit: '(-webkit-#{$feature}device-pixel-ratio: #{$value / 1dppx})'; - $moz: '(#{$feature}-moz-device-pixel-ratio: #{$value / 1dppx})'; - $fallback: '(#{$feature}resolution: #{$value / 1dppx * 96dpi})'; + $webkit: '(-webkit-#{$feature}device-pixel-ratio: #{math.div($value, 1dppx)})'; + $moz: '(#{$feature}-moz-device-pixel-ratio: #{math.div($value, 1dppx)})'; + $fallback: '(#{$feature}resolution: #{math.div($value, 1dppx) * 96dpi})'; // Append to output $output: append($output, $standard, space); $output: append($output, $webkit, space);