Early to learn less ideas and plans, has been busy rushing other things, did not set out to do, today got free, get started with less.
- Less a dynamic style language.
- Less adds CSS to the features of dynamic languages, such as variables, inheritance, operations, and functions.
- Less can be run on the client (ie 6+, Webkit, Firefox) or with node. js or Rhino on the server.
Construction of a bad environment
- Preparing: Installing Nodejs
- First you have to install LESSC. I installed it directly with NPM Package Manager and only needed one command:
npm install less -g(在Node.js command prompt中输入此命令)。
You can use the following command to see if your LESSC is installed successfully:$ lessc -v
- less2css 's dependent environment has been installed, now moving to sublime install plug-ins. After you open sublime Ctrl+shift+p>install package search Less2css Press ENTER.
- If you want to compile the generated CSS as a compressed CSS file, you also need to install a less plug-in less-plugin-clean-css, note that the plugin and LESSC installed in the same directory. Of course the installation is very simple, as long as the following line of command is done:
npm install less-plugin-clean-css -g
- Sublime does not support less code highlighting, here we can also install less plug-ins in the same way, to achieve the more than the highlight of the code.
- Complete
- After that, you can preferences > package Settings > Less2css > User
Setting LESS2CSS does not turn on compression and is configured as follows:
{ "minify": false }
Second, the network tutorial
- Http://www.cnblogs.com/jesse131/p/5258178.html
- Https://github.com/stuxt/stuxt.github.io/issues/8
Use sublime for efficient editing less