Can no longer compile bootstrap 2.3.2 LESS with Webstorm 8.0.2. LESS compile plugin. Getting compiler error(s)

一曲冷凌霜 提交于 2019-12-14 03:16:13

问题


I am updating one of my old projects which used Botstrap v2.3.2 with LESS. It used to compile without a hitch, but now I am getting this error:

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);

The problem appears to be here:

.spanX (@index) when (@index > 0) {
  (~".span@{index}") { .span(@index); } // <-- line 561 in mixins.less
  .spanX(@index - 1);
}

Not sure what the problem is. Any thoughts?


回答1:


As seven-phases-max redirects in his comment: https://stackoverflow.com/a/19553368/2712740

changed all instances where the error appeared from

  (~".span@{index}") { .span(@index); } // <-- line 561 in mixins.less

to

  .span@{index} { .span(@index); } // <-- line 561 in mixins.less

This was due to some breaking change in the new version of LESS compiler. As annoying as they are, this breaking change is definitely for the good (as always, the less boilerplate the better).
cheers



来源:https://stackoverflow.com/questions/23554468/can-no-longer-compile-bootstrap-2-3-2-less-with-webstorm-8-0-2-less-compile-plu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!