を取得するには、ループ内で変数を などに変更する必要がありname
ますtrees
balloons
.trees{ color:1;}
.balloons { color:2;}
しかし、私は代わりに得ます:
.trees{color:2}
.name{color:1}
このミックスインを試しましたが、うまくいきません。何が間違っていますか?
@name:name;
.name(@index) when (@index = 2) {@name: balloons;}
.name(@index) when (@index = 1) {@name: trees;}
.name(@index) when (@index > 0) {
.@{name}{ color:@index; }
.name(@index - 1)
}
.name(2);