Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. CSS Basics to Advanced

Lesson 39 of 50 · css

CSS Architecture – BEM, OOCSS, SMACSS, ITCSS

Duration: 12 mins

Maintainable CSS needs a naming convention and a layered architecture.

MethodCore Idea
BEMBlock __ Element -- Modifier (.btn--primary).
OOCSSSeparate structure from skin (object‑oriented).
SMACSSCategorises rules: Base, Layout, Module, State, Theme.
ITCSSInverted Triangle – from generic to explicit.

Example: BEM button

<button class="btn btn--primary">Click</button>
.btn { padding:0.5rem 1rem; border:none; }
.btn--primary { background:#0066cc; color:#fff; }
Previous: CSS Performance – Critical CSS & Unused CSSNext: CSS Pre‑processors – Sass & Less