What is ITCSS? The Inverted Triangle Approach
You'll learn: How ITCSS organizes your CSS from generic to specific in layers, preventing style conflicts and making your code more maintainable.
The Core Philosophy
ITCSS stands for Inverted Triangle CSS. It's an architectural approach that organizes your stylesheets into layers, arranged from the most generic, far-reaching styles at the top to the most specific, localized styles at the bottom.
Think of it like building a house: you start with the foundation (generic rules that affect everything), then the walls and structure (reusable components), and finally the interior decoration (specific, unique styles).
The Triangle Layers
ITCSS divides your CSS into distinct layers, typically:
- Settings — Global variables (colors, font sizes)
- Tools — Mixins and functions (if using preprocessors)
- Generic — Reset/normalize styles, box-sizing rules
- Elements — Bare HTML element styles (no classes)
- Objects — Layout patterns and structure
- Components — Your BEM blocks and UI components
- Utilities — Helper classes that override everything
Each layer becomes progressively more specific and has higher CSS specificity. Styles cascade naturally because you're working with the cascade, not against it.
Why the Inverted Triangle?
The "inverted triangle" visualization represents how styles become more specific but affect fewer elements as you move down. Generic resets affect everything (wide reach, low specificity). Utility classes affect very few elements (narrow reach, high specificity).
This structure prevents specificity wars because you never have low-specificity rules trying to override high-specificity ones.
Key Takeaway: ITCSS organizes CSS from generic to specific in layered files, aligning with CSS's natural cascade to reduce conflicts and make stylesheets predictable and maintainable.