将所有少的文件编译成一个样式表? [英] Compiling all less files into one stylesheet?

查看:108
本文介绍了将所有少的文件编译成一个样式表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用simpless,我把项目拖到它,并将所有较少的文件定位到styles.css

I am using simpless, I drag the project into it and target all the less files to styles.css

问题是当编译较少的样式表刚刚彼此写,而不是合并在一起。有没有办法编译时将它们全部合并到styles.css?

The issue is when compiling the less stylesheets are just over writing each other rather than being merged together. Is there a way when compiling to merge them all into styles.css ?

推荐答案

子文件。主文件将导入子文件:

You have to create a master less file that imports the subfiles. The master file would import the subfiles with:

@import "myfile1.less";
@import "myfile2.less";

进入编译器,你只需要传递master less文件。

Into the compiler, you just pass the master less file.

希望这有助于// ph

Hope this helps // ph

这篇关于将所有少的文件编译成一个样式表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆