Settings

Theme

Ask HN: SCSS/Sass vs. LESS

7 points by jrub 11 years ago · 16 comments · 2 min read

Reader

In talking to other web designers/developers, reading blog posts, and seeing "Show HN" posts, it seems that there are a lot of people who prefer SCSS/Sass over LESS.

There are large projects that use both technologies, such as Bootstrap (LESS) and Jekyll (SCSS/Sass) just to name a couple.

However, it seems like on a project-to-project basis, people tend to prefer to use Sass over LESS. I've heard some vague reasons why (such as looping and proper mixin/"method" calls in Sass) but never anything very concrete and compelling enough for me to understand the reasoning behind choosing one over the other.

Even more than the apparent popularity of SCSS/Sass is the apparent visceral hatred of the "other" system by users of it's "competitor." This seems to be more prevalent in the SCSS/Sass community (towards LESS), but I've seen it pointed in the other direction too.

So I turn to y'all; what are the reasons you choose SCSS/Sass or LESS for a project. Is it a simple matter of whichever technology you were exposed to first, and as such have a comfort with it and little reason to test the waters? Are you handcuffed into the system you use due to previous project decisions? Are there actual technical/usability reasons you know of that makes one better than the other? I'm really interested to know!

I myself use LESS, mostly because it's what I picked up first and have no significant use case where I had to switch to Sass (except for when using projects like Jekyll, which support Sass as a first class/the only citizen).

hajile 11 years ago

You will probably need to use node js anyway for other is build tools, but won't need ruby unless you use rails. Reduce your build to dependencies and use less.

That said, I recommend you look into stylus. It is better than either less or sass in my opinion as it gets rid of a lot of unnecessary syntax.

https://learnboost.github.io/stylus/

  • jrubOP 11 years ago

    The "unnecessary syntax" that a lot of people tend to loathe, I actually prefer. Maybe not semi-colons, but it takes me a day or two to get out of/into the habit of typing semi-colons at the end of each line, so it's not a big deal.

    But on the whole, I dislike whitespace-strict syntax (python for example). I'd much rather have my curly braces simply for the specificity they apply to the code for opening and ending blocks.

tannerj 11 years ago

I started with LESS (Bootstrap) and couldn't make the column gutters collapse. I did some research, found that I could do that in Zurb Foundation so I started using foundation. It was that simple difference that caused me to go with SASS over LESS. I actually wasn't doing anything custom in either framework at first, but once I wanted to start customizing the framework I started learning SASS and really like it. I've also been learning ruby/rails and it's nice that its written in the same language. I've now dropped the idea of a huge framework and have been learning compass and susy with sass and I really like that solution as opposed to an entire framework. I think both LESS and SASS are great and valid solutions to the problem. At this point it's just preference.

edited for clarity

MalcolmDiggs 11 years ago

I think much of the valid "us vs them" arguments came in the pre-SCSS days. Back then SASS was NOT a superset of css, while LESS was. So choosing between them could lead to very different codebases / workflows. These days they are both supersets (or rather, SCSS is a superset, you know what I mean), and they have many of the same options available, so IMHO the differences are trivial.

ceejayoz 11 years ago

FYI, Bootstrap has an official SCSS version as well as the LESS one. https://github.com/twbs/bootstrap-sass

poseid 11 years ago

I like LESS recently, since it is NodeJS (= fast and easy to setup)

akvlad 11 years ago

I think the big reason people prefer SASS is because of Compass - http://compass-style.org/

Spoom 11 years ago

I prefer LESS since its syntax is essentially a superset of CSS.

I'd still be interested in hearing the arguments in favor of SASS.

  • ceejayoz 11 years ago

    SCSS is also a superset of CSS (rename a .css file to .scss and it's good to go).

mmset 11 years ago

I use LESS because easy very easy to compile with node.js. Not to disregard the fact that Bootstrap 3 is LESS bound.

sehr 11 years ago

LESS. I don't enjoy logic in stylesheets and having to mess with Ruby mucks up most JS based build systems IMO

hcarvalhoalves 11 years ago

Myself I prefer LESS since it's closer to CSS.

I believe most people using SASS do because of Rails.

drakmail 11 years ago

I'm use SASS, because it's default for Rails.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection