Сss. BEM (Block Element Modificator)

BLOCK AND ELEMENT

Blocks can be inside blocks infinite times

<div class = "block">
  <div class = "block__element">
  </div>
  <div class = "anotherBlockInside">
     <div class = "someOtherBlockInside">
     <div class = "someOtherBlockInside_element">
     </div>
  </div>
</div>

Block is independent and reusable.

Element always needs parent.

MODIFICATOR

boolean modificator

<div class = "block block_enabled">
  <div class = "block__element_disabled ">
  </div>
</div>

key pair modification

<div class = "block block_key_value">

</div>

Block can be without element

<div class = "block">

</div>
This entry was posted in Без рубрики. Bookmark the permalink.