Created
June 14, 2013 20:23
-
-
Save ajtroxell/5784975 to your computer and use it in GitHub Desktop.
LESS Font and Line Height Mixin from: http://ajtroxell.com/less-font-and-line-height-mixin/
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(@font-size: 16){ | |
@pxFontValue: (@font-size / 10); | |
@pxLineValue: (@font-size / 10 * 1.5); | |
font-size: @font-size * 1px; | |
line-height: @font-size * 1.5 * 1px; | |
font-size: ~"@{pxFontValue}rem"; | |
line-height: ~"@{pxLineValue}rem"; | |
} |
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
h1 { | |
font-size:14px; | |
line-height:21px; | |
font-size:1.4rem; | |
line-height:2.0999999999999996rem; | |
} |
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
h1 { .font-size(14); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment