Curious to see what people think about CSS frameworks like SASS or YAML?

I've seen two main schools of thought on this topic:

- Frameworks are necessary for streamlining the front end dev process
- Frameworks require too much training or are too transient to be useful in the long term.

I've personally never used SASS but found HAML to be extremely useful in a startup I was involved with. Having the preprocessor allowed me to unclutter the front end code and made everything much more readable. It was a little difficult to get into in the beginning due to the indentation requirements (very python-esque) but after awhile I started to really enjoy it.
3
LVL 14

Comment

by:Brandon Lyon
CSS preprocessors and frameworks have their pros and cons and definitely come in handy for certain use cases.

CSS preprocessors like SASS & LESS can come in handy because of variables, color math, and mixins. Overall the downsides tend to outnumber the upsides, especially when working on large teams. If I were going to use something like SASS these days I would probably just switch over to generating the CSS using javascript (which is another trend that is becoming common). That also has its pros and cons but is even more flexible and comes with fewer cons.

CSS frameworks tend to be useful if you're building something from scratch and don't want to deal with styles. The main issues with CSS frameworks are bloat and inheritance issues. When modifies the styles in those frameworks or only needs a small percentage of them it starts to become a pain point. If you're an experienced user of CSS then frameworks end up taking more time to fix than it would take to implement the styles one needs from scratch.
1
LVL 44

Comment

by:Rob
I agree with Brandon.  

If your dev environment is set up to use them then it works really well.  If used in an adhoc way they can be really messy.  Even more so that normal CSS!

I personally do not like referring to them as frameworks as my understanding is they are built using the same language.  These are essentially 3rd party programs that introduce their own variables and structure.  I see them more as a compiler of sorts but I'm probably just being picky hahaha

What I do like is bringing a sense of Object Oriented programming as CSS for the most part is a mess even when you do try to do it right.  You want to have a consistent base font, size etc etc and it drives me crazy trying to implement that effectively.

Bloat is certainly a concern as you want it to produce effective and efficient CSS.  This has been an issue in the past with Web IDEs like Dreamweaver and Frontpage is that they would generate terrible html and proprietary at that and really bloat the site.

I use PHP and a framework called CakePHP to assist with the development and ongoing development of the site.  It's a trade off for sure but as the complexity ramps up, that's where the framework comes into its own as you would be generating almost as much code yourself and most likely more inefficient.  No different to using a JS framework like jQuery, reactjs, Angular or knockout.

So for me it's about complexity.  The more complex the site, the more you may look at using a CSS "framework".  If it's simpler then writing your own is probably the best way to go.  Really a case by case basis.

Certainly with any framework you should always learn the basics to understand what the framework is actually doing.
1

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month