Answer the question
In order to leave comments, you need to log in
Is it possible to write like this in bem?
<div class="header">
<div class="header__left"></div>
<div class="header__right right-lite">
<div class="right-lite__control"></div>
<div class="header__btn"></div>
</div>
</div>
<div class="header">
<div class="container">
<div class="header__logo"></div>
<nav class="header__nav"></nav>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
In general, everything seems to be legal (except for semantics :-) ).
But it depends on how you write styles further.
https://ru.bem.info/methodology/key-concepts/#%D0%...
https://en.bem.info/forum/4/
that is, header__btn
it should not depend on right-lite
.
header__right
- about positioning inside the header, should not be related to - a vivid example of a classic bam mix. That is, in fact, you need a block , but for positioning inside the header, you mix it as an elementright-lite
<div class="header__right right-lite">
right-lite
header__right
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question