根据this question可以从less v导入css文件.1.4.0.
我尝试使用 gulp-less 任务,但它不起作用.
有什么方法可以像这样导入 css 文件: @import "../spritesheet.css"; with nodeJS gulp?
According to this question it's possible to import css file from less v.1.4.0.
I tried to use gulp-less task, and it's not working.
There's any way to import css file like this: @import "../spritesheet.css"; with nodeJS gulp?
有几种方法可以在 LESS 中包含文件,这取决于您的需要,使用 @import ([keyword]) "filename".
There are several ways to include files in LESS, depending on what you need, using @import ([keyword]) "filename".
允许的关键字是:
Lesscss.org - 导入选项
我不清楚你的用例是什么,但如果你想在 LESS 文件中进一步使用 spritesheet.css 的内容(例如扩展你的 spritesheet 中定义的类),你需要 (less) 关键字.
It's not clear to me what your use case is, but if you want to use the contents of spritesheet.css further on in your LESS file (for example extending classes defined in your spritesheet) you need the (less) keyword.
如果您只想将 spritesheet.css 的内容包含到输出文件中,而根本不从 LESS 文件中访问它们,请坚持使用 (inline).
If you just want to include the contents of spritesheet.css into your output file without accessing them from within the LESS file at all, stick with (inline).
这篇关于使用 nodejs gulp 在 Less 中导入 .css 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
是否可以将标志传递给 Gulp 以使其以不同的方式Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以将标志传递给 Gulp 以使其以不同的方式运行任务
如何一个接一个地依次运行 Gulp 任务How to run Gulp tasks sequentially one after the other(如何一个接一个地依次运行 Gulp 任务)
由于 MIME 类型而未加载样式表Stylesheet not loaded because of MIME-type(由于 MIME 类型而未加载样式表)
CSS3 过渡(供应商前缀)立即使 Safari 崩溃CSS3 Transition ( Vendor Prefixes) crashes Safari immediately(CSS3 过渡(供应商前缀)立即使 Safari 崩溃)
@font-face 让 IE8 崩溃@font-face crashes IE8(@font-face 让 IE8 崩溃)
jquery按长度限制文本jquery limit text by length(jquery按长度限制文本)