-
Book Overview & Buying
-
Table Of Contents
LESS WEB DEVELOPMENT ESSENTIALS
By :
With the different import rules, you can start using Less in your project without having to change your code. After importing your CSS, you can start defining variables and using mixins step by step. Always check the output of your new code before you start using it for production.
Please remember that style guides can help you manage the migration of your project, and also don't forget that you have to compile your Less on the server side into CSS code before using it in production.
Try to organize your files in the same way as in the preceding examples. Create separate files for your project's variables and mixins. If your project defined a style sheet in project.css earlier, your main Less file can look, for instance, like the following code:
@import "reset.less"; @import "variables.less"; @import "mixins.less"; @import (less) "project.css";
You will import your original project.css in the preceding code; alternatively, you can rename it as project...
Change the font size
Change margin width
Change background colour