在WinLess on buttons.less上,我得到一个'eval‘is null或not对象。
有人吗?
ps。我使用了最新版本的所有内容,并导入了变量/混合体。
我使用的版本是: WinLess 1.5.3减去1.3个引导带2.04
编辑:
这一点在Bootstrap 2.1.1中得到了修正。
发布于 2012-07-01 20:37:22
Twitter引导团队州,他们不能保证像button.less这样的单个文件的编译。它们鼓励编译具有所有所需依赖项的bootstrap.less。否则,您必须确保拥有button.less (通常是mixins.less和variables.less)所需的所有依赖项。
实际上,这个问题似乎与WinLess中的一些解析问题有关,所以在修复之前,您可以使用一个黑客来欺骗WinLess解析器。在mixins.less中,更改:
// 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解析器并使其工作!
发布于 2012-07-01 21:16:14
还有别的工作要做。
删除button.less中的注释
.btn {
display: inline-block;
.ie7-inline-block();
padding: 4px 10px 4px;
margin-bottom: 0; // For input.btn
font-size: @baseFontSize;
line-height: @baseLineHeight;
*line-height: 20px;
color: @grayDark;
text-align: center;
text-shadow: 0 1px 1px rgba(255,255,255,.75);
vertical-align: middle;
cursor: pointer;
.buttonBackground(@btnBackground, @btnBackgroundHighlight);
border: 1px solid @btnBorder;
*border: 0; **// Remove the border to prevent IE7's black border on input:focus [remove this]**
border-bottom-color: darken(@btnBorder, 10%);
.border-radius(4px);
.ie7-restore-left-whitespace(); **// Give IE7 some love [remove this]**
.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
}https://stackoverflow.com/questions/11285295
复制相似问题