Chapter 2 CSS Architecture and Organization

If you’ve ever worked on a CSS code base of any size—or even a small code base with multiple developers—you quickly realize how difficult it is to create CSS that is predictable, reusable, and maintainable without being bloated. With added developers often comes added complexity: longer selectors, colliding selectors, and heavier CSS.

In this chapter, we’ll explore CSS architecture and organization. First up is file structure. We’ll take a look at how to manage CSS across large sites, or as part of your own CSS framework. We’ll also address how to manage CSS for older browsers.

Next we’ll discuss some guidelines for writing CSS. Even if you disavow the CSS architecture methodologies we cover ...

Get CSS Master 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.