Created
September 15, 2015 12:41
-
-
Save dededey/7f439cf69b5959d2bc80 to your computer and use it in GitHub Desktop.
looping for iteration creat nth child x
for background color
This file contains hidden or 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
.loopingClass (@index) when (@index > 0) { | |
.single-day:nth-child(@{index}){ background-color: darken(#96bbdd,@index*4) ;} | |
.loopingClass(@index - 1); | |
} | |
// end the loop when index is 0 | |
.loopingClass (0) {} | |
// "call" the loopingClass the first time with highest value | |
.loopingClass (@iterations); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment