Last active
January 3, 2016 09:19
-
-
Save MikeGillihan/8441917 to your computer and use it in GitHub Desktop.
Font sizing with rem mixin. A simple Sass mixin for sizing fonts with rem plus px as a fallback.
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($size: 16, $base: 16) { | |
font-size: $size + px; | |
font-size: ($size / $base) * 1rem; | |
} |
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
div { | |
@include fontSize(14); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment