Created
November 6, 2012 18:56
-
-
Save jbuedel/4026713 to your computer and use it in GitHub Desktop.
A loop in sass
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
$marginDirections: left, right, bottom, top; | |
$marginValues: 10, 20, 30, 40, 50, 60; | |
@for $marginDirection from 1 through length($marginDirections) { | |
@for $marginValue from 1 through length($marginValues) { | |
.add-#{$marginDirection}-#{$marginValue} { | |
margin-#{$marginDirection}: #{$marginValue}px; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment