LESS or Sass or neither?
I wrote this post a while back. The content can still be relevant but the information I've linked to may not be available.
CSS preprocessors like LESS and Sass are hugely popular – and for good reason! Once you've picked up their syntax, they can shorten the time taken to write CSS, give you all sorts of useful functions, enable CSS compression, and give you a warm fuzzy feeling inside. Well, perhaps not that last one but you get the idea.
I've been using Sass for a few recent projects and I quite like it although it does give me a slight sense of disconnect from my normal working environment. In case you might be wondering why, I use (shock horror) Dreamweaver as my main coding and development environment. I find it works really well, OK?!
So, I expect to use Sass more and more but I'm not making it my first priority. Instead, I want to spend a lot more time making my final CSS smarter by reading more about OOCSS, SMACCS and similar – and putting these into practice. For me and my 'typical' projects, I can put a style sheet together quickly enough so the time saving factor of LESS or Sass is not the main thing. It just seems to make more sense for me (at the moment) to focus on making the end product smarter.
Of course, time saving and writing smarter CSS are not mutually exclusive but I think that concentrating on one of these will be better for me. You may have a different process or be at a different development stage – in which case, all power to your elbow! (or something like that). For me though, the OOCSS route looks better at the minute.
Comments
28 Sep 2012 18:25:26
Good points there Clive. I am using Less with Codekit to rapidy create frameworks to begin site wireframing and then design. Mixins allow me to add browser specific CSS3 elements with ease and I always start with a colour list. From that base I design in the browser for most of the site – tweaking here and there as I go.
Beyond that I have not gone anywhere near the limits of what Less or Sass can do and I think they can only really come into their own on a big complex project, or suite of websites, where you want consistency within a team and across sites.
28 Sep 2012 19:16:03
@Simon: Sounds good. I definitely want to explore the colour management functions of Sass at some point but I think your point about larger websites is key. My sites are quite small compared with some so my productivity gains with Sass are not as great.
16 Dec 2013 22:09:30
So why did you choose the go with Sass rather then LESS? Looks like the user base of either one is split in half.
17 Dec 2013 08:55:00
Richard: I liked Sass because of the
extend
directive, which I thought would be very useful. It might be that LESS has something similar now but, at the time, I thought Sass was better because of this.01 Apr 2014 22:27:53
Stylus!
http://www.slideshare.net/cjoudrey/simplify-your-css-with-stylus-and-nib
http://www.slideshare.net/CarlosOrtega57/stylus-27209784
Comments are OFF for this post.