如何正确实现以下语法?
.jacket(@classname, @attrname, @value) {
.class-prefix-@{classname}[some-prefix-@{attrname}~="@{value}"] {
// ^Error From Here
// Attributes
}
}
lessc显示有SyntaxError: expected ']' got '@'
答案 0 :(得分:3)
实际上这似乎是一个错误,这种解决方法应该可以解决问题:
.jacket(@classname, @attrname, @value) {
@attr: ~'some-prefix-@{attrname}';
.class-prefix-@{classname}[@{attr}~="@{value}"] {
// ...
}
}