Last Updated: August 05, 2019
·
4.173K
· viczam

Why sass (scss) is better than less

Short story

SASS

less

  • twitter bootstrap is built on top of less (but there are ports of it for sass)
  • easier to get started with
  • ugly error messages
  • while some (most) of control directives can be achieved through guarded mixins, they look counter intuitive and require repetition and hacks

Long story:

9 Responses
Add your response

Another great point for SASS: named arguments for functions/mixins

over 1 year ago ·

@dpashkevich Indeed, that is a very cool feature

over 1 year ago ·

@duiker101 Yes, but it doesn't have control directives, loops and so on. As others stated, you can do that (if-s with guarded mixins, loops with recursive calls etc), but they are not as intuitive as they are in sass (and they are harder to maintain and write).
Also, less lacks things like sass' @extend (yes, you can include other mixins or classes, but it will generate more code) and many others.
I do like less too - I've been using it for a year now :), the main reason being that twitter bootstrap was written in less. But I like more the expressiveness and power of sass. It's also more actively maintained.

over 1 year ago ·

Btw, the extend functionality for LESS is in the works... Just a side note. Add Sass like extend

over 1 year ago ·

@dpashkevich great to hear that

over 1 year ago ·

Sass requires Ruby, which can make maintenance of app more complicated if app itself isn't written in Ruby (maybe it works in JRuby, though). Less has more implementations, and main implementation in javascript works in many environments (browser, node.js, JVM - rhino).

over 1 year ago ·

Please, don't add CodeKit as Sass Pro argument - CodeKit supports Less too.

over 1 year ago ·

@kolen - your application doesn't have to be written in ruby, not at all, but sass requires ruby.

@dcsturm - last time I checked CodeKit was able to handle sass only. Now I see it can compile less too.
But I don't use CodeKit anymore. If you want something at least as complete as CodeKit, have a look at http://yeoman.io/

over 1 year ago ·

Can someone explain to me (or link to a blog post), WTF is wrong with CSS in the first place?

over 1 year ago ·