233zbq
Last Updated: February 25, 2016
·
3.497K
· viczam
Fe757c8b244660deb28c3ef6330cb51e

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:

Say Thanks
Respond

10 Responses
Add your response

2186
D42a7264714dee5006b9c99d2567a320

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

over 1 year ago ·
2205
Fe757c8b244660deb28c3ef6330cb51e

@dpashkevich Indeed, that is a very cool feature

over 1 year ago ·
2234
Untitled 1

To me it just seems that you are a bit unfair to LESS, it does have many of the same things SASS have like named arguments, nested properties etc... I think they are both good and the only way to find the one you prefer is to try both instead of reading some list.

over 1 year ago ·
2235
Fe757c8b244660deb28c3ef6330cb51e

@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 ·
2423
D42a7264714dee5006b9c99d2567a320

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

over 1 year ago ·
2556
Fe757c8b244660deb28c3ef6330cb51e

@dpashkevich great to hear that

over 1 year ago ·
6675
73aa7ad0c97ecb6a1d766fa8810aba29

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 ·
6676

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

over 1 year ago ·
6677
Fe757c8b244660deb28c3ef6330cb51e

@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 ·
6679
394f6b9d56b619645cc7ef912702fe54

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

over 1 year ago ·