首页 > Web开发 > 详细

PhpStorm generate CSS by LESS

时间:2015-10-05 21:53:44      阅读:262      评论:0      收藏:0      [点我收藏+]
        Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable. Less runs inside Node, in the browser and inside Rhino. 
 
        We always use LESS format file to generate CSS file. In PhpStorm, it also can realize it. Now, let‘s realize it by the following ways.
 
Install LESS
        Because Less runs inside Node, we need to install node.js firstly. We can download the node.js on official website https://nodejs.org .  After installing node.js, we can use instruction " npm install -g less " to install LESS.
 
Config PhpStorm
        After we install Less, if you want to use it in PhpStorm, you need to config PhpStorm firstly. 
 
       If you have install node.js. When you open a project on PhpStorm, and create a LESS file. The PhpStorm normally will warnning you as following:
技术分享
        Click "Add watcher", it will popup the setting panel 【Edit Watcher】.
技术分享
技术分享
       Setting as above, and click "ok". The LESS file will generate CSS file automatically.
 
       If there didn‘t have the warnning. You can also realize it by the following ways: 【Settings】->【Tools】->【File Watchers】. Then on the right sidebar, there is a 技术分享 button. Click it, and choose 【Less】.  Now, it will also appear a 【Edit Watcher】 panel.
 

PhpStorm generate CSS by LESS

原文:http://www.cnblogs.com/lizsCnBlog/p/4856288.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!