A
A
Andrei Popov2019-02-22 15:54:20
BEM
Andrei Popov, 2019-02-22 15:54:20

BEM different positioning of 2 identical blocks in a block?

5c6ff035c9ea1717645773.png
For example, the situation is when there are 2 identical blocks in the block, which I want to set DIFFERENT positioning using mixes. Judging by the examples in the BEM documentation, I should write it like this (option-1), but then the blocks will be positioned EQUALLY. Will (option-2) follow BEM rules? Or how else to implement this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2019-02-22
@andrei500

Option 1 works well when blocks have the same behavior/position, option 2 is possible but not very pretty, I would do this:

<header class="header">
  <button class="button header__auth">Войти</button>
  <button class="button header__join">Зарегистрироваться</button>
</header>

Mixing with two different elements, positioning as you please.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question