我试图将一个较少的文件编译成css,但是当我尝试在这里编译这段代码时:
.colors() {
.-("Maroon",#800000);
.-("Red",#FF0000);
.-("Orange",#FFA500);
.-("Yellow",#FFFF00);
.-("Olive",#808000);
.-("Green",#800000);
.-("Purple",#800080);
.-("Fuchsia",#FF00FF);
.-("Lime",#00FF00);
.-("Teal",#008080);
}
.icons(){
.-("icon-adjust", "\f042");
.-("icon-adn", "\f170");
.-("icon-align-center", "\f037");
.-("icon-align-justify", "\f039");
.-("icon-align-left", "\f036");
.-("icon-align-right", "\f038");
.-("icon-ambulance", "\f0f9");
.-("icon-anchor", "\f13d");
.-("icon-android", "\f17b");
.-("icon-angellist", "\f209");
.-("icon-angle-double-down", "\f103");
.-("icon-angle-double-left", "\f100");
.-("icon-angle-double-right", "\f101");
}
.easyUI {
.colors();
.-(@color_,@bgColor)
{@color: e(@color_);
&.@{color} {
background: @bgColor;
color: contrast(@bgColor);
border: 1px solid darken(@bgColor, 20%);
&:hover {
background: darken(@bgColor, 8%);
border: 1px solid darken(@bgColor, 15%);
}
}
}
.icons();
.-(@icon_,@content)
{@icon: e(extractor(@icon_));
&.@{icon} {
&.prepend:before {
font-family: fontAwesome;
content: @content;
margin-right: 10px;
}
&.append:after {
font-family: fontAwesome;
content: @content;
margin-left: 10px;
}
}
}
}
失败了,我收到了这个错误:
SyntaxError:错误评估函数
darken
:Object#has 没有方法' toHSL'
为什么呢?对此有何解释?
非常感谢