// ............................................................
// .for
.for(@i, @n) {.-each(@i)}
.for(@n) when (isnumber(@n)) {.for(1, @n)}
.for(@i, @n) when not (@i = @n) {
.for((@i + (@n - @i) / abs(@n - @i)), @n);
}
// ............................................................
// .for-each
.for(@array) when (default()) {.for-impl_(length(@array))}
.for-impl_(@i) when (@i > 1) {.for-impl_((@i - 1))}
.for-impl_(@i) when (@i > 0) {.-each(extract(@array, @i))}
.generate-logo-styles(@width, @bg-color: silver) {
width: 30px;
height: 30px;
position: relative;
background-color: @bg-color;
@team-names: real, milan, arsenal;
.for(@team-names); .-each(@name) {
&.@{name}-logo {
margin-left: @width;
.@{name}-logo(@width); //ВОТ ЗДЕСЬ КОМПИЛЯТОР ВЫДАЕТ ОШИБКУ
}
}
}
.test {
.generate-logo-styles(200px);
}
.article-about-milan-logo {
.team-logo(30px, "milan");
}