如何更改班级名称,添加短划线“ - ”。
@iterations: 5;
.span-loop (@i) when (@i > 0) {
.span-@{i} {
width: ~"@{i}%";
}
.span-loop(@i - 0.5);
}
.span-loop (@iterations);
结果:
.span-4.5 {
width: 4.5%;
}
.span-4 {
width: 4%;
}
如何获得这样的结果?
.span-4-5 {
width: 4.5%;
}
.span-4 {
width: 4%;
}