Course contentsShow
← Web Development
Lesson 1331 of 2,98224. CSS Architecture and MaintainabilityFree lesson

What is ITCSS? The Inverted Triangle Approach

Learn the core philosophy of ITCSS: organizing CSS from generic to specific in layers to reduce conflicts.

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:

  1. Settings — Global variables (colors, font sizes)
  2. Tools — Mixins and functions (if using preprocessors)
  3. Generic — Reset/normalize styles, box-sizing rules
  4. Elements — Bare HTML element styles (no classes)
  5. Objects — Layout patterns and structure
  6. Components — Your BEM blocks and UI components
  7. 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.