Posted by: Peter Andrease

Posted on: July 10, 2012 4:16 pm

-

How to use less css for your next web project – part 2 of 2

Last week I talked you through the benefits of using Less.css in your next web project. If you missed part one click here to read it first. I’ll be rounding up the tutorial with info on “Nested Rules” and “Functions & Operations.”

Nested Rules
Nested rules allow you to specify child selectors to keep your stylesheet smaller and easy to navigate. It also forces you to keep your stylesheet much more organised. See below how it works:

Functions & Operations
With Functions and operations you can add and subtract numbers in your stylesheet. It’s complicated but can save you a lot of time and dramatically reduce the size of your less stylesheet. This just touches on what’s possible with functions and operations in the less css. See below:

As you can see less.css is a very useful css language and a lot of people are using it now. After a small learning curve you’ll find yourself using it often, it saves time and makes your css much more easy to go through when re-visiting.

Peter Andrease

Peter Andrease

Peter heads up the entire web design team at our agency and enjoys delivering interesting posts that deal with brand new design tips, tricks and tools. As his strengths also lie in client training, Peter has also produced a huge number of tutorials on the subject of design, many of which can be found elsewhere on the site.
-
-

Tags: , ,

Authors
Categories
Archives
Blogroll