3 ms·
I'd be more impressed if this tutorial had included examples where you use SASS (or your favorite css compiler) for building out css. Simply because it provides
by latchkey 15y ago
I'd be more impressed if this tutorial had included examples where you use SASS (or your favorite css compiler) for building out css. Simply because it provides you with proper organization of css rules and negates the need for naming conventions to figure out what things are. Using CSS without SASS is like writing JavaScript without using CoffeeScript.
- mattmanser 15y ago99% of people do write JavaScript without using CoffeeScript you plonker!
- judofyr 15y agoSASS can be dangerous when it comes to nesting. It's so easy to just keep nesting rules, and before you know it you've coupled your CSS tightly to the structure on one specific page.
- bobfunk 15y agoCouldn't agree more. I'm actually starting to become very skeptical of my own use of compass and sass. SASS makes it extremely easy to generate loads of really complex selectors that are very tightly coupled to the HTML they are styling. Mixins also makes it very easy to end up with badly bloated CSS. When a mixin defines a gradient and you apply it to different selectors, you'll get the whole bunch of browser prefixed gradient declarations repeated in lots of different places of your final css. A simple class with the gradient defined used in the HTML will make the final CSS much leaner. Personally I've decided to limit my use of SASS/compass far more and follow a style much closer to what's described in this article.
- jwdunne 15y agoAnother thing is that, generally, the more nesting you add, the more inefficient the compiled CSS will be. Getting carried away with SASS-like nesting could very well produce a splodge of inefficient, single-use CSS.
- snookca 15y agoI don't believe that SASS saves you from proper organization or naming convention. However, Less and SASS have been mentioned and I'll see about added something that covers how I believe those tools can fit into this (because I believe that can and do).
- jordanlev 15y agoVery strongly disagree with this -- not because there's anything wrong with SASS, but because it introduces another thing that needs to be learned for many people. A good tutorial should be teaching one concept at a time, otherwise it is really confusing for people that aren't already familiar with both concepts (which is kind of the target audience for a tutorial).