How Do You Name Your CSS Classes?



This content originally appeared on DEV Community and was authored by Jenna

What’s Your Preferred CSS Class Naming Convention?

  • BEM (Block Element Modifier)
  • SMACSS (Scalable and Modular Architecture for CSS)
  • OOCSS (Object-Oriented CSS)
  • Atomic CSS
  • Others

There are various naming conventions for CSS classes, each with its own advantages. What conventions do you use, and why do you prefer them?

Are you more of a dash (-) or underscore (_) person when naming CSS classes?


This content originally appeared on DEV Community and was authored by Jenna