A cautionary note about generated CSS

As noted in the first chapter, writing bad Sass will generate bad CSS. Overuse of nesting, @extend, and mixins can lead to bloated code and over-specific selectors. Therefore, apply the same level of common sense when writing Sass as you would when writing plain vanilla CSS (when I say vanilla CSS, I just mean normal CSS with no preprocessor involved in its creation). For example, only make rules as specific as they need to be, don't nest rules too deeply and don't repeat mixins unless necessary.

Getting the hang of writing Sass well from the outset is important. Using Sass and Compass to create CSS files means you will be less inclined to look at the final outputted CSS.

However, even if Sass and Compass don't ...

Get Sass and Compass for Designers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.