less编译css_使用LESS应用程序编译LESS CSS文件

本文介绍了如何使用LESS.app这个Mac应用来管理和自动编译LESS文件为CSS,包括其自动编译和CSS压缩功能,对于经常处理LESS CSS的开发者来说是一个节省时间的工具。
摘要由CSDN通过智能技术生成

less编译css

LESS CSS

Last week I showed you how you can easily create your own Dijit theme with LESS CSS.  The process of creating LESS files is simple, as is compilation of said files, but I was frequently forgetting to compile the .less files before checking the style changes in the browser.  When I did have the sense to compile, I found myself completely annoyed at having to run the same command over and over.  Enter LESS.app:  a Mac app which allows you to add folders containing .less files and automatically compiles them when a file is saved!

上周,我向您展示了如何使用LESS CSS轻松创建自己的Dijit主题 。 创建LESS文件的过程很简单,就像编译所述文件一样,但是我经常忘记在浏览器中检查样式更改之前编译.less文件。 当我确实有编译意识时,我发现自己不得不一次又一次地运行相同的命令而感到烦恼。 输入LESS.app :一个Mac应用程序,它允许您添加包含.less文件的文件夹,并在保存文件时自动编译它们!

After downloading and opening the app, the first step is dragging the "davidwalsh" theme directory into the app's left drawer:

下载并打开应用程序后,第一步是将“ davidwalsh”主题目录拖到应用程序的左侧抽屉中:

LESS CSS Files

LESS.app will scan the directly and list each .less file.  You can click the checkbox to the right of the file to instruct Less.app to minify the CSS output, which is especially helpful when getting your CSS ready for production.

LESS.app将直接扫描并列出每个.less文件。 您可以单击文件右边的复选框,以指示Less.app缩小CSS输出,这在使CSS投入生产时特别有用。

Once all of the .less files you want compiled appear within the list, switch to the Compiler tab and click the "Compile All" button:

一旦要编译的所有.less文件出现在列表中,请切换到“编译器”选项卡,然后单击“全部编译”按钮:

LESS CSS Compile

LESS.app will then compile each desired .less file into a working .css file, minified if you had so chosen.  The compiler will spit back a success or failure message at the end of each compilation.  One last feature I will point out is the "Automatically compile files when saved" feature, which compiles your .less files when any of them is saved.  This awesome feature is great for people like myself who frequently change and refresh.

然后,LESS.app将把每个所需的.less文件编译成一个有效的.css文件,如果您选择了此文件,则将其缩小。 编译器将在每次编译结束时回显成功或失败消息。 我要指出的最后一个功能是“保存时自动编译文件”功能,该功能可以在保存任何.less文件时对其进行编译。 这项很棒的功能非常适合像我这样经常更换和刷新的人。

LESS CSS Compiled

If you're frequently working with LESS CSS, you really must get LESS.app.  The "compile when saved" and CSS minification features make LESS.app a huge time-saving utility.

如果您经常使用LESS CSS,则实际上必须获得LESS.app。 “保存时编译”和CSS最小化功能使LESS.app成为节省大量时间的实用程序。

翻译自: https://davidwalsh.name/less-css

less编译css

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值