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.
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.
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?
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.
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].
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.
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 {}.
25 comments
[ 6.1 ms ] story [ 61.8 ms ] threadhttps://gist.github.com/chriseppstein/674726
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).
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.
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.
Here you'll find more comprehensive comparison between the three of them: http://net.tutsplus.com/tutorials/html-css-techniques/sass-v...
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
http://incident57.com/less/
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/
Or I might think you are talking about browsing text files..