Answer the question
In order to leave comments, you need to log in
How to implement less loop for sprite mixins?
The layout has a block with brands, pictures of brands in a sprite. The sprite generator generated mixins for less, so as not to write a separate style for each, I'm trying to do it through a cycle on less, the code is like this:
@amount: 9;
.myLoop (@index) when (@index < @amount) {
.brands__item@{index} { // Вот здесь имя селектора генерируется верно
.sprite();
[email protected]{index}; //а здесь, ругается unrecognized input
}
.myLoop(@index + 1);
}
.myLoop (1);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question