Chapter 9Architecture
Architecture has always been one of the major pain points in CSS
development. Without any variables, control directives, macros, or object
inheritance, CSS code tends to be long and repetitive—a single ever-growing
file. While it’s technically possible to split plain CSS into multiple files
that reference each other with @import, the additional
HTTP requests make that a poor solution. As you’ve seen, Sass has an answer
for every piece of the architecture puzzle—but what’s the best way to put it
all together?
Ask ten experts, and you’ll receive ten different answers—most of them involving (or aided by) Sass. OOCSS, SMACSS, Atomic Design, ITCSS, and BEM are all popular systems for CSS architecture, but there are many more. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access