Book Image

Bootstrap Site Blueprints

Book Image

Bootstrap Site Blueprints

Overview of this book

Table of Contents (16 chapters)
Bootstrap Site Blueprints
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding the power of LESS


In the following sections, we will be organizing, editing, customizing, and creating LESS files in order to generate the desired CSS for our designs.

Note

If you are unfamiliar with LESS and would like to learn more about it, I would recommend the following resources:

In a nutshell, we may say that generating CSS using the LESS preprocessor is an exciting and freeing experience. The key benefits of working with LESS are discussed in the following sections.

Nested rules

Nested rules greatly enhance the efficiency of composing styles. For example, writing selectors in CSS can be highly repetitive:

.navbar-nav { ... }
.navbar-nav > li { ... }
.navbar-nav > li > a { ... }
.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus { ... }

This same set of selectors and their styles...