Home  >  Article  >  Web Front-end  >  How Do You Name Your CSS Classes?

How Do You Name Your CSS Classes?

WBOY
WBOYOriginal
2024-07-22 16:20:201096browse

How Do You Name Your CSS Classes?

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?

The above is the detailed content of How Do You Name Your CSS Classes?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn