O'Reilly logo

Learning Web Development with Bootstrap and AngularJS by Stephen Radford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Less 101

To get a better understanding of what Less actually provides, let's have a quick Less 101 to get to grips with some of the ideology and syntax behind the pre-processor. We're going to take a look at four of the main features of Less: importing, mixins, nested rules, and variables. A full list of language features can be found at http://lesscss.org/features/. What's great about Less is that if you don't want to use any of its new syntax or features, you don't have to. Any valid CSS is also valid Less.

Importing

Just like in CSS, we can include one file within another in Less. It even follows the same syntax as in CSS:

@import "file.less"

However, unlike CSS, which will make an additional HTTP request for the referenced file, Less will merge ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required