SASS, LESS and nesting overload

Both SASS and LESS are really nice tools for CSS developers. Both have the ability to nest selectors like this:

#header {
   h1 { font-size: 3em }
   p { font-size: 1.2em }

…which compiles to

#wrapper h1 { font-size: 3em }
#wrapper p { font-size: 1.2em }

Nesting is really useful, just don’t go more than 2-3 levels deep. I’m currently wading through a bunch of code which was generated from LESS files, and the (huge) stylesheet is full of selectors like this:

html body #wrapper #header #access a:link { ... }

You have been warned!

1 thought on “SASS, LESS and nesting overload”

Leave a Reply

Your email address will not be published. Required fields are marked *