Book Image

Less Web Development Essentials

By : Bass Jobsen
Book Image

Less Web Development Essentials

By: Bass Jobsen

Overview of this book

Less is a CSS preprocessor that essentially improves the functionality of simple CSS with the addition of several features. The book begins by teaching you how Less facilitates the process of web development. You will quickly then move on to actually creating your first layout using Less and compiling your very first Less code. Next, you will learn about variables and mixins and how they will help in building robust CSS code. In addition, you'll learn how to keep your code clean and test it by using style guides. We will then move on to the concept of Bootstrapping and the strength of using Less with Twitter Bootstrap. Going one step further, you will be able to customize Twitter's Bootstrap 3 using Less. Finally, you will learn how to integrate Less into your WordPress themes and explore other web apps that use Less. By leveraging this powerful CSS preprocessor, you will be able to consistently produce amazing web applications while making CSS code development an enjoyable experience.
Table of Contents (15 chapters)
Less Web Development Essentials
About the Author
About the Reviewers

Migrating your project

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.

Organizing your files

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...