SASS is better than LESS PreProcessor
SASS is better than LESS PreProcessor.
- Sass lets you write re-usable method and use logic statements; ie. conditionals and loops. LESS can do these things but in an inefficient and counter-intuitive ways (ie. guarded mixins for conditionals, self-referencing recursion for loop). Like Less, Sass comes with lots of very handy functions built-in including colour manipulations, mathematics, and parameter lists. SASS is better than LESS PreProcessor.
- Sass users can utilise the awesome powers of the Compass library. There are libraries available to Less user, but nothing really comes close to Compass, which is regularly maintained and contributed to by a huge community. Compass has some really awesome features like dynamic sprite-map generations, legacy browser hacks, and cross-browser support for CSS3 features.
- Compass also lets you add an external framework like Blueprint, Foundations, or Bootstrap on top. This means you can easily harness all the power of your favourite framework without having to deal with the mess of using multiple tools. SASS is better than LESS PreProcessor.
Problems with Less
Less aims to be as much like CSS in style, syntax and structures, and while this is a nice thought for easing users into writing it, there are a few issue which make it a lot less fun to works with than Sass:
In Less you can write a basic logic statement using a ‘guarded mixin’:
The equivalent in Sass using if statements:
In Less you can loop through numeric values using recursive functions:
In Sass you can iterate through any kind of data, which is much more helpful:
In Sass, you can write your own handy functions like so: