dededey
9/15/2015 - 12:41 PM

looping for iteration creat nth child x for background color

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);