我正在更新一个使用BESSstrap v2.3.2和LESS的旧项目。它曾用于编译顺利,但现在我收到此错误:
LESS CSS Compiler Error
mixins.less: Parse Error: Unrecognised input (line 561, column 6) near .spanX
(@index) when (@index > 0) { (~".span@{index}") { .span(@index); } .spanX(@index - 1);
问题似乎在这里:
.spanX (@index) when (@index > 0) {
(~".span@{index}") { .span(@index); } // <-- line 561 in mixins.less
.spanX(@index - 1);
}
不确定问题是什么。有什么想法吗?
答案 0 :(得分:1)
在他的评论中,七个阶段的最大重定向: https://stackoverflow.com/a/19553368/2712740
更改了错误出现的所有实例
(~".span@{index}") { .span(@index); } // <-- line 561 in mixins.less
到
.span@{index} { .span(@index); } // <-- line 561 in mixins.less
这是由于新版LESS编译器发生了一些重大变化。虽然它们很烦人,但这种突破性变化绝对是好事(一如既往,越少,样板越好) 欢呼声