Home > Article > Web Front-end > less preprocessor to write CSS_html/css_WEB-ITnose
During the interview yesterday, the interviewer asked me: Have you ever used less? Me: Hungry. . . . I've heard it before, but haven't studied it specifically.
So I decided to figure this out today.
Code such as Less cannot be executed directly in the browser and ultimately needs to be compiled into CSS or JS. Their syntax is great, but the way they compile is not very flexible. The official basically only provides a command line method for file compilation. less can also embed a less.js in the page for online compilation, but this method is really unreliable. Therefore, everyone likes to use graphical interface tools to perform compilation work, which is efficient and fast. Before the development of koala, there were already some tools, such as winLess, simpless, etc., all of which have relatively single functions and only support less. There are also some students who are tossing around with editors such as sublime text, but there is currently no perfect solution. Fortunately, now there is Koala.
Koala is a desktop program that supports real-time compilation of less, sass, and coffeescript, helping web developers use less, sass, and coffeescript development more efficiently.
Project address: http://koala-app.com/index-zh.html
Nowadays, the new styles of CSS3 must be added with the browser kernel prefix to be compatible. We will write a lot of duplicates For css code, of course you can also use Ctrl C and Ctrl V, but writing a large amount of seemingly illogical code in this way is inconvenient for maintenance and expansion, and is not conducive to reuse.
First open the downloaded koala, then add the project to be developed, right-click to write less, tick automatic compilation in the upper right corner, and finish writing it every time The corresponding css file will be automatically generated.