LESS:使用引导时无法识别的输入错误 [英] LESS: Unrecognized input error when using Bootstrap

查看:896
本文介绍了LESS:使用引导时无法识别的输入错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级Harp后,我开始在CSS的不相关行中收到无法识别的输入错误。

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


Less - > CSS(无法识别的输入)/Users/jorge/Dropbox/harp.io/apps/mysite.com/public/css/main.less

使用Bootstrap v2.2.2和Harp v0.9.4。

Using Bootstrap v2.2.2 and Harp v0.9.4.

推荐答案

挖了一会儿,错误来自 mixin.less 文件,其中 #grid 正在定义。

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

这是文件最初的内容:

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

阅读 LESS更改日志,我发现他们改变了语法,所以你现在可以直接使用变量,而不需要〜hack。所以我改变了我的 mixin.less 看起来像这样:

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); } 更改为→ .offset @ {index} {.offset(@index); }

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

这篇关于LESS:使用引导时无法识别的输入错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆