Fix for rounding

This commit is contained in:
Sam Potts
2017-12-20 15:32:16 +00:00
parent 6864149989
commit 6bc3592381
3 changed files with 8 additions and 84 deletions

View File

@ -31,11 +31,14 @@
// Use rems for font sizing
// Leave <body> at 100%/16px
// ---------------------------------------
@mixin font-size($font-size: 16) {
$rem: decimal-round(($font-size / 16), 3);
@function calculate-rem($size) {
$rem: $size / 16;
@return #{$rem}rem;
}
font-size: ($font-size * 1px);
font-size: '#{$rem}rem';
@mixin font-size($size: 16) {
font-size: $size * 1px; // Fallback in px
font-size: calculate-rem($size);
}
// Font smoothing