我知道哪里可以使用less,但是这样做(这是行不通的):
<div class="fixed-width(150px)" ></div>
.fixed-width(@customWidth) {
width: @customWidth;
}像这样的...seems比提供的示例更有意义:
<div class="fixed-width" ></div>
.fixed-width {
.another-step(150px);
}
.another-step(@customWidth) {
width: @customWidth;
}有没有简单的方法来完成我错过的这件事?
发布于 2011-09-15 06:19:49
不是的。LESS仅编译CSS文件,而不编译内联CSS。您必须编写一个改进的解析器来生成您已经在使用的代码。
https://stackoverflow.com/questions/7423647
复制相似问题