Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 382 Bytes

005-nesting-in-bem.md

File metadata and controls

19 lines (14 loc) · 382 Bytes

About nesting in BEM

In BEM blocks should have plain structure. There is no need to repeat DOM nesting in BEM classes:

.nav__item__link { }

You won't be able to reuse this element in another context or refactor later.

To reflect nesting it's enough to use only DOM:

<ul class="nav">
  <li class="nav__item">
    <a class="nav__link"></a>
  </li>
</ul>