Created
July 9, 2012 13:34
-
-
Save machal/3076599 to your computer and use it in GitHub Desktop.
LESS: Font size in rem unit with fallback to pixels
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
| // Nastaveni velikosti pisma v rem s fallbackem v px | |
| // Zdroj: http://www.stuffandnonsense.co.uk/blog/about/less | |
| @baseFontSize: 15; | |
| .font-size(@font-size: @baseFontSize) { | |
| @rem: (@font-size / @baseFontSize); | |
| font-size: @font-size * 1px; | |
| font-size: ~"@{rem}rem"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment