Dotless 编译失败;在 Bootstrap 3 中较少的源代码 [英] Dotless failing to compile ; in Bootstrap 3 less source

查看:27
本文介绍了Dotless 编译失败;在 Bootstrap 3 中较少的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 dotless 1.3.1.0 编译较少文件.这适用于 bootstrap 2.x,但在切换到 bootstrap 3.0.0 之后(从这里下载源代码:http://getbootstrap.com/getting-started/),我突然收到这个错误:

<块引用>

预期的 ')' 但在文件 'mixins.less' 的第 47 行找到了 ' ': [46]://尺寸快捷键 [47]: .size(@width; @height) {------------^ [48]:宽度:@width;

似乎有一个;作为参数之间的分隔符无效.mixins.less 中的原始来源如下所示:

<代码>...//尺寸快捷键.size(@width; @height) {宽度:@width;高度:@高度;}...

我是否必须使用更新的 less 编译器?还是 bootstrap 发布了错误更少的源代码?

更新 1: 我可以看到,存在对 dotless 的拉取请求,用 ;

解决了问题

https://github.com/dotless/dotless/pulls修复 ; 在混合参数列表中不受支持 #319 #320"

我将继续使用 css 文件,直到这在 dotless 中得到修复.

解决方案

我的一位使用 dotless 的同事对合并的 Bootstrap 3 问题进行了一些修复.显然 Bootstrap3 现在将使用最新代码进行编译 :)

https://github.com/dotless/dotless/commits/master

我预计很快会提供更新的 NuGet 包(基于 这条推文)>

I use dotless 1.3.1.0 compiling less-files. This worked fine with bootstrap 2.x, but after switching to bootstrap 3.0.0 (downloaded the source from here: http://getbootstrap.com/getting-started/), I suddenly get this error:

Expected ')' but found ' ' on line 47 in file 'mixins.less': [46]: // Sizing shortcuts [47]: .size(@width; @height) { ------------^ [48]: width: @width;

Seems that having a ; as seperator between parameters is not valid less. The original source in the mixins.less looks like this:

...
// Sizing shortcuts
.size(@width; @height) {
  width: @width;
  height: @height;
}
...

Do I have to use an updated less compiler? Or did bootstrap release buggy less source?

UPDATE 1: I can see, that a pull request for dotless exists, fixing the problem with ;

https://github.com/dotless/dotless/pulls "Fixes for ; not supported in mixin parameter lists #319 #320"

I will go using the css files until this has been fixed in dotless.

解决方案

One of my colleagues that uses dotless has had a few fixes for Bootstrap 3 issues merged. Apparently Bootstrap3 will now compile with the latest code :)

https://github.com/dotless/dotless/commits/master

I expect an updated NuGet package will be available soon (based on this tweet)

这篇关于Dotless 编译失败;在 Bootstrap 3 中较少的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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