Created
June 29, 2013 23:32
-
-
Save pjschreifels/5893129 to your computer and use it in GitHub Desktop.
#layout #less - Create top, right, bottom and left margin classes from 0px to 50px in 5px increments. Use as .mt_x, mb_x, mr_x, ml_x (top, bottom, right left margin, respectively), where x is a number from 0 to 50.
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
// Margin classes | |
// ------------------------- | |
@from : 0; | |
@to : 50; | |
.loop(@index) when(@index =< @to) { | |
.mt_@{index} { | |
margin-top: unit(@index, px); | |
} | |
.mb_@{index} { | |
margin-bottom: unit(@index, px); | |
} | |
.mr_@{index} { | |
margin-right: unit(@index, px); | |
} | |
.ml_@{index} { | |
margin-left: unit(@index, px); | |
} | |
.loop(@index + 5); | |
} | |
.loop(@from); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment