我注意到less.js在firefox中工作但在Chrome中没有,或者是因为我犯了错误?
<link rel="stylesheet/less" href="css/style.less" />
<script src="http://lesscss.googlecode.com/files/less-1.0.21.min.js"></script>
@highlight: #cb1e16;
@shade1: #cb1e16;
@tone1: #5c6f7d;
@grad1: #e6edf3;
@grad2: #8a8d92;
@text1: #333e44;
header, footer, section, article, nav, aside { display: block; }
.grad {
background: @grad2;
background: -moz-linear-gradient(top, @grad1, @grad2 1200px);
background: -webkit-gradient(linear, 0 0, 0 1200, from(#e6edf3), to(#8a8d92));
}
html {
.grad;
min-height: 100%;
}
Run Code Online (Sandbox Code Playgroud)
即使我尝试html { background: red; }它仍然无法在chrome中工作我在某处犯了错误?
如果我要从同一目录导入多个文件,我想重用目录路径(假设带有import语句的文件与导入目标不在同一目录中).到目前为止,我试过这个:
@directoryPath: "../modules/core/less/";
@import @directoryPath + "file.less";
@import (@directoryPath + "file.less");
@import @{directoryPath}"file.less";
@import "@{directoryPath}file.less";
@filePath: @directoryPath + "file.less"; //I have verified this produces the proper string
@import @filePath;
@import @{filePath};
Run Code Online (Sandbox Code Playgroud)
6个import语句都不起作用.他们中的一些人在工作
source: url(/*LESS variables*/);
Run Code Online (Sandbox Code Playgroud)
声明,但在@import语句中的工作方式不同.关于什么会起作用的任何想法?