本文介绍了在WinLess上编译twitterbootstrap button.less时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在button.less的WinLess上得到一个'eval'为null或不是对象.

I get an 'eval' is null or not object on WinLess on buttons.less.

有人吗?

ps.我已经使用了所有内容的最新版本,并导入了变量/mixins

ps. I have used the latest version of everything and import variables / mixins

我使用的版本是:WinLess 1.5.3减1.3Bootstrap 2.04

the version I used are:WinLess 1.5.3Less 1.3Bootstrap 2.04

此问题已在Bootstrap 2.1.1中修复

This is fixed in Bootstrap 2.1.1

推荐答案

Twitter引导团队状态他们不保证像button.less这样的单个文件的编译.他们鼓励具有所有必需依赖项的bootstrap.less的编译.否则,您必须确保拥有button.less(通常是mixins.less和variables.less)所需的所有依赖项.

Twitter bootstrap team states that they do not guarantee compilation of individual files like button.less. They encourage the compilation of the bootstrap.less which has all the needed dependencies. Otherwise you have to be sure that you have all the dependencies needed by button.less (usually mixins.less and variables.less).

实际上,该问题似乎与WinLess中的某些解析问题有关,因此,在解决此问题之前,您可以解决一个欺骗WinLess解析器的问题.在mixins.less中,更改:

Actually the problem seems to be related to some parsing problems in WinLess, so before it is fixed you can come around with a hack which will dupe the WinLess parser. In mixins.less, change :

// IE7 inline-block
// ----------------
.ie7-inline-block() {
  *display: inline; /* IE7 inline-block hack */
  *zoom: 1;
}

与:

// IE7 inline-block
// ----------------
.ie7-inline-block() {
  *display: inline; /* IE7 inline-block hack */
  *zoom: 1;
  // comment to make it work with WinLESS
}

如您所见,这包括在 // comment to make it work with WinLESS 中添加新行以复制WinLess解析器并使之起作用!

As you can see it consists to the adding a new line to // comment to make it work with WinLESS to dupe the WinLess parser and make it work!

这篇关于在WinLess上编译twitterbootstrap button.less时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 08:37