LESS: Unrecognized input error when using Bootstrap

删除回忆录丶 提交于 2019-11-26 07:47:17

问题


After upgrading Harp, I started getting an Unrecognized Input error in an irrelevant line of CSS.

Less -> CSS (Unrecognised input) /Users/jorge/Dropbox/harp.io/apps/mysite.com/public/css/main.less

Using Bootstrap v2.2.2 and Harp v0.9.4.


回答1:


After digging for a while, I found that the error was coming from the mixin.less file where the #grid stuff was getting defined.

This is what the file had originally:

(~".span@{index}") { .span(@index); }

After reading the LESS change log, I found that they changed the syntax so you can now use variables directly without needing the ~ hack. So I changed my mixin.less to look like this:

.span@{index} { .span(@index); }

There are a couple of other lines that you need to change, but they all follow the same format.

(~".offset@{index}") { .offset(@index); } changes to → .offset@{index} { .offset(@index); }



来源:https://stackoverflow.com/questions/19553367/less-unrecognized-input-error-when-using-bootstrap

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