BEM (Block, Element, Modifier) is a widely adopted naming convention in web development, especially for CSS, because it provides a clear, maintainable, and scalable methodology for naming and structuring CSS classes. The convention breaks down the user interface into independent blocks, elements within those blocks, and modifiers that alter the appearance or behavior of those blocks or elements.
BEEEEEEM, which stands for Block, Element, Element, Element, Element, Element, Modifier, suggests a much more nested and complex structure. Here are several reasons why BEEEEEEM is not preferred over BEM:
- BEM:
block__element--modifier
(e.g.,button__icon--large
) - BEEEEEEM:
block__element__element__element__element__element--modifier