I'm trying to generate this css:
img.consults {
/*some css*/
}
img.coworkers {
/*some css*/
}
img.dashboard {
/*some css*/
}
with these less css code.
@type1: "dashboard";
@type2: "consults";
@type3: "coworkers";
.loopingClass (@index) when (@index > 0) {
@ctype: "type@{index}";
@type: e(@@ctype);
img.@{type} {
/*some css*/
}
.loopingClass (@index - 1);
};
.loopingClass(3);
Instead of the desired css code. I get three times
img.dashboard {
/*some css*/
}
It should start generating img.consults, since it is a count down, but I end up with three times img.dashboard, which is the first one, so should be generated last. I can't get my head around it! What am I doing wrong here?