Search code examples
bem

BEM: Is it okay to use two element classes on one child?


Example:

<div class="pageProduct">
  <div class="pageProduct__section pageProduct__secondChildClass"></div>
  <div class="pageProduct__section></div>
  <div class="pageProduct__section></div>
  <div class="pageProduct__section></div>
</div>

I don't want to use a modifier and I'm not sure if this syntax is okay.


Solution

  • Sure, it's called mix. There also can be a mix of a block and an element on the same DOM node.