Lesson 39 of 50
cssCSS Architecture – BEM, OOCSS, SMACSS, ITCSS
12 mins
Course progress78%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 39 of 50
css12 mins
Keep these ideas in mind as you work through the lesson.
Maintainable CSS needs a naming convention and a layered architecture.
| Method | Core Idea |
|---|---|
| BEM | Block __ Element -- Modifier (.btn--primary). |
| OOCSS | Separate structure from skin (object‑oriented). |
| SMACSS | Categorises rules: Base, Layout, Module, State, Theme. |
| ITCSS | Inverted Triangle – from generic to explicit. |
<button class="btn btn--primary">Click</button>
.btn { padding:0.5rem 1rem; border:none; }
.btn--primary { background:#0066cc; color:#fff; }