Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Jacob Miranda
Jacob Miranda
19,392 Points

LESS vs SASS/SCSS

Are there any differences between the two and is there one you guys prefer to choose? And how should I go about using one or the other?

Thanks in advance guys! Happy coding~

5 Answers

Kevin Korte
Kevin Korte
28,149 Points

I think Chris Coyier wrote a great and unbiased article on the two.

http://css-tricks.com/sass-vs-less/

It seems they accomplish the same thing, in slightly different ways.

Just two months ago I started using sass. (And I'm using the scss syntax as it's more comfortable, and more like traditional css with the brackets).

I just eventually dove into it, combed through the sass documents as I built, try to go back through and use variables, mixins, etc as much as possible. It will slow down your css development at first, but soon enough you'll be faster at writting css, plus some of the features it has is freaking cool.

Another reason I chose sass is because I wanted to try out the compass framework with it.

As far as a preproccessor, I use Scout (free) on my work PC, and right now Scout (free) on my mac, but am seriously contemplating using CodeKit ($20-$25) for my mac.

Wart Burggraaf
Wart Burggraaf
9,948 Points

Just like to write a quick reply: SCSS / SASS!

Use Sass, LESS sucks.

I'm sorry but it does. It's only still kicking because of Twitter Bootstrap. Stylus and Sass are superior in almost every way. The syntax is confusing and completely nonstandard whereas Sass at least TRIES to look like CSS and do things the CSS way. Using the "@" for variables is one of those things that screams bad engineering. @ already has a purpose in CSS, which is directives. Using it for variables should have never been a consideration. Sass on the other hand uses the elegant PHP syntax, $variable.

The single biggest reason to use Sass is selector inheritance. With sass, I can make a dummy class and then use the @extend option to then give other classes attributes of those dummy classes. This makes OOCSS actually feasible instead of a melange of class spaghetti. There's a hacky sort of way to do this in LESS but it feels horrible. You simply embed a class inside another class. It's very confusing code to read.

LESS's math is much weaker. I can't do any sort of mixed unit math, say divide ems by px. This is no issue for Sass.

LESS does not have proper loops and control structures. Having these can massively simplify code. You can loop in LESS but if you'd see the code that makes it happen, you'd flee from LESS like you were on fire.

Sass also has the benefit of using either CSS or Ruby syntax. I use the Ruby syntax constantly but most use the SCSS style. No big deal because converting between the formats is a simple command line switch.

I personally think Stylus is better than both of them but I stick with Sass for two big reasons which is the Susy grid library and the Compass typography module. I find those two tools essential to my everyday workflow.

Sass using the Scss style.

Chris Scott
Chris Scott
7,673 Points

SASS/SASS

Nothing more beautiful except for maybe Stylus..