私はこのcssを生成しようとしています:
img.consults {
/*some css*/
}
img.coworkers {
/*some css*/
}
img.dashboard {
/*some css*/
}
これらのより少ないCSSコードで。
@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);
目的の CSS コードの代わりに。私は3回取得します
img.dashboard {
/*some css*/
}
カウント ダウンなので の生成を開始する必要がありますが、最初のimg.consults
3 回で終わるため、最後に生成する必要があります。img.dashboard
頭が回らない!ここで何が間違っていますか?