Holla All , The Problem is that I want to implement some css style with a variable ( Animation Delay to specific ) on Generated Images That i don;t know their number I could do this with Jquery Yea Easy But What about doing it with Less Css
@iterations: ??; This loop will work if I know the num of iterations
// helper class, will never show up in resulting css // will be called as long the index is above 0
.loopingClass (@index) when (@index > 0) {
// create the actual css selector, example will result in
// .myclass_30, .myclass_28, .... , .myclass_1
(~".myclass_@{index}") {
// your resulting css
my-property: -@index px;
}
// next iteration
.loopingClass(@index - 1);
}
// end the loop when index is 0
loopingClass (0) {}
// "call" the loopingClass the first time with highest value
.loopingClass (@iterations);
My question is there anyway to get the num of img using Less wo Using another thing and passing it to LESS