将两个.less文件加入一个css文件 [英] Join two .less files into one css file
本文介绍了将两个.less文件加入一个css文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用lesscss时,我想将两个或三个.less文件合并到一个超级 css文件中。
When working with lesscss I would like to join two or three .less files into one super css file.
可以使用一些小红宝石魔法来做到这一点,但我想知道在较少的引擎中是否有简单的东西。
I know that you can do it using some little ruby magic, but I would like to know if there is something simple in the less engine?
推荐答案
您可以使用 import
,类似于在常规CSS文件中的方式。
You can use import
, similar to how you can in a regular CSS file.
@import "reset";
@import "config";
@import "header";
@import "forms";
取自此SO post 。在 Less文档的导入部分中也提到了这一点。
Taken from this SO post. It's also mentioned in the "Importing" section of the Less Documentation.
这篇关于将两个.less文件加入一个css文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文