Last active
December 15, 2015 21:49
-
-
Save patrickmarabeas/5328379 to your computer and use it in GitHub Desktop.
Using a LESS mixin for font-size allows us to have font-family determined dynamically based on font-size
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
.fontSize (@a) when (@a >= 100) { | |
font-family: Impact, Charcoal, sans-serif; | |
} | |
.fontSize (@a) when (@a < 100) { | |
font-family: "Comic Sans MS", cursive, sans-serif; | |
} | |
.fontSize (@a) { | |
font-size: @a; | |
} | |
.myClass1 { | |
.fontSize(50px) | |
} | |
.myClass2 { | |
.fontSize(110px) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment