Answer the question
In order to leave comments, you need to log in
How did you do an arithmetic progression in less?
.style{
position: absolute;
&-1{
left: 65px;
}
&-2{
left: 80px;
}
&-3{
left: 95px;
}
}
Answer the question
In order to leave comments, you need to log in
.generate-styles(3);
.generate-styles(@n, @i: 1) when (@i =< @n) {
[email protected]{i} {
left: 50px + @i * 15px;
}
.generate-styles(@n, (@i + 1));
}
.style-1 {
left: 65px;
}
.style-2 {
left: 80px;
}
.style-3 {
left: 95px;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question