Last active
August 29, 2015 14:02
-
-
Save vvasabi/324f8e1b522536eb95d5 to your computer and use it in GitHub Desktop.
IE8-compatible font style mixin that uses rem unit.
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
$root-font-size: 16px; | |
@mixin font($size, $line-height, $weight: null) { | |
font-size: $size; // IE fix | |
font-size: ($size / $root-font-size) * 1rem; | |
@if $weight != null { | |
font-weight: $weight; | |
} | |
line-height: $line-height; | |
} | |
// Usage example: | |
// p { | |
// @include font(24px, 1.25, bold); | |
//} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment