Last active
February 6, 2018 15:48
-
-
Save droid001/979b7b66ad00ee3fa3208f3cc128cf7d to your computer and use it in GitHub Desktop.
transform font size to rems, optional line height
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
@mixin fontsize($font-size, $line-height:false) { | |
$size: strip-unit($font-size); | |
font-size: #{$size}px; | |
font-size: #{$size/strip-unit($base-font-size)}rem; | |
@if $line-height { | |
// line-height:ceil($font-size / $base-line-height) * ($base-line-height / $font-size); | |
line-height: $line-height; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment