Hacker News new | past | comments | ask | show | jobs | submit login
LESS – The Dynamic Stylesheet (designmodo.com)
24 points by SmeelBe on Aug 5, 2013 | hide | past | web | favorite | 25 comments

I've written quite a bit in LESS and Sass. My personal preference has been Sass ever since the Sassy Sass syntax.

In Sass, I like

* clear separation of mixins and classes syntax.

* of course, @extend.

* partials naming convention separation from normal compiled sass files.

* compass[1]

* been with Sass for a while and I'm way too comfortable with it.

Edit: Pre-mature submission earlier. Added few reasons why I like Sass.

1. http://compass-style.org/

Compass alone is worth using SASS for me. I've developed on both for about 2 years now. When I get to pick, I pick SASS. They're both very powerful, though. After 8 years of development, they made me love CSS again.

Which CSS preprocessor language should I choose? LESS or SASS?

Both Sass and LESS are CSS preprocessors, which allow writing clean CSS in a programming construct instead of static rules.

LESS is inspired by Sass. Sass was designed to both simplify and extend CSS, so things like curly braces were removed from the syntax. LESS was designed to be as close to CSS as possible, so the syntax is identical to existing CSS code. As a result, existing CSS can be used as valid LESS code.

The newer versions of Sass also introduced a CSS-like syntax called SCSS (Sassy CSS).

> Both Sass and LESS are CSS preprocessors, which allow writing clean CSS

I'd say they both allow writing dirtier CSS with a clean source code, the ease of nesting & mixin can blow up the size and complexity of the generated style without it being immediately visible.

> in a programming construct instead of static rules.

Most of what less and sass do are static expansion rules.

Honestly, it probably comes down to your choice of environment. If you like Ruby, use SASS. If you like Node, use LESS. They're both very good and very powerful.

I've seen this said a few times and I still don't understand it. Why would liking Ruby/Node affect the choice? It's a pre-processor. You don't write in Ruby/Node anywhere unless you're extending them.

additional dependencies / more moving parts.

as a node developer, i am guaranteed to have a working node install. I don't need to integrate and managing a working ruby install into my production/deployment pipeline.

Any reason behind this? I've been using sass in node, and was just wondering.

Just fewer pieces to move around. If you have a Node install, no need to maintain a Ruby install just for your preprocessor, etc.


I like to think of Less as the MySQL of the CSS world, whereas Sass is more of a Postgres.

I fail to see how you came to such a distinction. I'd say it's closer to one being mysql and the other one being mariadb, it's not like any of them focuses on correctness or anything.

based on the link below https://gist.github.com/chriseppstein/674726 Sass appears to be more verbose in accomplishing the same goal... so... I think Less is more like CoffeeScript and Sass is more like Javascript?

Having used LESS for a long time I've switched to SCSS because the debugging is so much better. I found that less would often fail silently and just truncate the style sheet. I'm a rubyist and I've found since switching that the framework support is a bit better as well. The value of the compass framework[1] also can't be overstated, it's a fantastic standard library for css3 etc. There doesn't really seem to be an equivalent for less.

If you're looking for a simple setup that will allow you to use SCSS I can't recommend middleman[2] enough, it's easy to setup and you can use livereload with it very easily (admittedly it does require ruby...). If you're on github you can even get free hosting using middleman-gh-pages[3].

[1] http://compass-style.org/ [2] http://middlemanapp.com/ [3] https://github.com/neo/middleman-gh-pages

It's really a matter of personal preference - all of three popular preprocessors (including Stylus) do their job well.

Here you'll find more comprehensive comparison between the three of them: http://net.tutsplus.com/tutorials/html-css-techniques/sass-v...

I don't think anybody could make the choice for you, but it might help to read the following for a comparison that might help you make up your mind.


Hmmm, thank you.

Both are good enough. Give both a try. No matter what people argue once you test both at least for a day, you would be able to find the right one for you.


If you're on a Mac and using LESS, LESS.app (or it's bigger brother CodeKit - which I think also does SASS) is a godsend.


Yep, I prefer this app too. The reliance on Ruby or Javascript initially put me off Less.

the reliance on ruby kills sass for me.

That example of nesting is scary -- if your CSS requires that specific of a selector, something's gone horribly wrong. You're probably fine with #nav a {}.

> You might have heard until now of LESS and you might know it has something to do with CSS and styling websites

Or I might think you are talking about browsing text files..

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact