Created
August 21, 2012 17:55
-
-
Save lessallan/3417863 to your computer and use it in GitHub Desktop.
@for sass function issue
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
$color_2: lighten(#026dbd, 45%) | |
$color_3: lighten(#fad52c, 20%) | |
$color_4: lighten(#f17d32, 20%) | |
$color_5: lighten(#da1c1c, 25%) | |
$color_6: lighten(#8266ba, 20%) | |
$color_7: lighten(#7bb545, 17%) | |
@for $i from 2 through 7 | |
&:nth-child(#{$i}) | |
background-color: $color_#{$i} |
Scott, this revision is brilliant, thank you.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can also write a list and make it one variable.