1 Post for June 2009

Sass and Less

Posted June 17, 2009

There’s been a lot of buzz recently about the release of Less, a new CSS preprocessor created by Alexis Sellier. It takes a lot of inspiration from Sass: it supports variables, arithmetic, nesting, and mixins, although none to the full degree of power that Sass allows.

There are two things that Less offers that Sass doesn’t: implicit mixins and a syntax that’s closer to CSS. Implicit mixins just mean that every class defined in a Less file can be used as a mixin. This means that when designers discover that they want to re-use a class, they can skip the step of refactoring it into a mixin.

The syntax is what’s really getting people excited, though. Unlike Sass, which has its own nested syntax, Less builds on existing CSS syntax, using brackets and semicolons rather than indentation and newlines. The variables are more familiar for Ruby developers, too, being prefixed with @, rather than !.