Last active
February 15, 2018 08:36
-
-
Save hlynx/8d4bcc4e985b839daa42bf85ccbc3412 to your computer and use it in GitHub Desktop.
Simplifies markup a lot
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
@margins: 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, 80; | |
.margin-mixin(); | |
.margin-mixin(@i: length(@margins)) when (@i > 0) { | |
.margin-mixin(@i - 1); | |
@margin: extract(@margins, @i); | |
.margin-@{margin} { | |
margin-bottom: ~"@{margin}px"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment