Skip to content

Instantly share code, notes, and snippets.

@dededey
Created September 15, 2015 12:41
Show Gist options
  • Save dededey/7f439cf69b5959d2bc80 to your computer and use it in GitHub Desktop.
Save dededey/7f439cf69b5959d2bc80 to your computer and use it in GitHub Desktop.
looping for iteration creat nth child x for background color
.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