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

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

问题描述

升级 Harp 后,我开始在不相关的 CSS 行中收到 Unrecognized Input 错误.

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

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

Less -> CSS (Unrecognised input) /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:使用 Bootstrap 时出现无法识别的输入错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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