Created
April 2, 2013 07:38
-
-
Save timsnadden/5290562 to your computer and use it in GitHub Desktop.
Less mixin for doing font-sizing/line-heights with rems and falling back to px for browsers without rem support.
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
.font-size(@sizeValue){ | |
@remValue: @sizeValue / 10; | |
@pxValue: (@sizeValue); | |
font-size: ~"@{pxValue}px"; | |
font-size: ~"@{remValue}rem"; | |
} | |
.line-height(@sizeValue){ | |
@remValue: @sizeValue / 10; | |
@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