-
Book Overview & Buying
-
Table Of Contents
Less Web Development Essentials (Second Edition)
By :
As you already know now, a valid CSS code is also a valid Less code. The CSS code can be imported into Less. There are different ways to do this. After importing your CSS, you can run the result through the compiler. This offers you an easy way to start using Less in your current project.
Consider creating a style guide before you start to import your CSS code. Style guides help you to test your code, as described in Chapter 4, Testing Your Code and Using Prebuilt Mixins Libraries. In addition, you must remember that Less is a CSS preprocessor. This means that you have to compile your Less code into CSS before taking it into production. Client-side compiling with less.js should only be used for test purposes! This is because client-side compiling may result in performance degradation and compiling the style sheets will take time. You will have to repeat the compiling process for every page request.
Only importing your CSS code, and then compiling it back into CSS...
Change the font size
Change margin width
Change background colour