Hacker News new | ask | show | jobs
by knuckle_cake 5697 days ago
We've been using Sass in production since we launched. Love it.

I've not seen any real comparison between LessCSS and SCSS (i.e. the new Sass syntax that became available with Sass version 3.0) There were some real differences before that, but that's not nearly so clear to me anymore.

At present, we've decided that there's no reason to use LessCSS as we already use Haml and there's nothing that Less offers that gives us a reason to switch from recent versions of Sass. I'm not even sure what the differences are now.

2 comments

Replying to my own comment, but Chris Eppstein has put up a gist of some differences, both syntactical and semantic, between SCSS and LessCSS. They are very, very similar to each other now, as I thought.

https://gist.github.com/674726

Have you found that it produces stylesheets that are noticeably larger than what you would have written in just CSS?
My experience has been the opposite - stylesheets get smaller, because there's less repetition and fewer wasted styles. CSS has a really nasty habit of ballooning over time into an unholy tarpit of selectors and overrides and exceptions, especially when you're working with multiple people in the code.

Any bloat caused by the more verbose selectors seems to be easily offset by the lack of repetition, and the maintenance is orders of magnitude easier to manage. At the end of the day, you're still talking about maybe a couple of extra kb, which ends up being a negligible number of bytes post-gzip. In exchange, you get massively easier-to-manage stylesheets and a whole lot less developer time spent to make things happen.

Over the past couple of weeks, I've been refactoring a very large stylesheet with SASS.

  Original size: 138.8k (gz: 23.5k, 16.9% original size)
  Sass-generated size: 105.9k (gz: 18.2k, 17.1% original size)
Very, very easily worth the transition, and as a bonus, the stylesheet is factored into a bunch of partials, each relevant to different parts of the site, so when I want to tweak something in comments, I just open _comments.sass and hack there, rather than trying to find the right section in a monolithic stylesheet.
In my experience, no. After generating the CSS, we run it through YUI compressor for the deployed version. Any size differences remaining are measurable in bytes, and the ability to truly refactor our stylesheets more than makes up for that small difference.