Last active
August 29, 2015 14:08
-
-
Save benjaminrrrrr/d15dbeedf0e4149bc135 to your computer and use it in GitHub Desktop.
LESS h1...h6 generator with ruleset
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
//Writing out h1, h2, h3, h4, h5, h6 is for suckerz. Use this less function instead! | |
.h(@index, @ruleset) when (@index > 0){ | |
h@{index}{ | |
@ruleset(); | |
} | |
.h(@index - 1, @ruleset); | |
} | |
//set color of h1, h2, h3 to red | |
.h(3, {color: red;}); | |
//set color of h1..h6 to blue | |
h(6, {color: blue;}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment