Created
July 2, 2013 15:01
-
-
Save szpakoli/5910046 to your computer and use it in GitHub Desktop.
CSS Font Sizes - REMs with PX fallback for older broswers
(snippet pulled from Base Framework: http://matthewhartman.github.io/base/)
This file contains hidden or 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
// Font Sizes (REMs with PX fallback for older browsers) | |
.font-size (@sizeValue) { | |
@remValue: @sizeValue / 16; | |
@pxValue: (@sizeValue); | |
font-size: ~"@{pxValue}px"; | |
font-size: ~"@{remValue}rem"; | |
} | |
// Line Height Sizes (REMs with PX fallback for older browsers) | |
.line-height (@sizeValue) { | |
@remValue: @sizeValue / 16; | |
@pxValue: (@sizeValue); | |
line-height: ~"@{pxValue}px"; | |
line-height: ~"@{remValue}rem"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment