Answer the question
In order to leave comments, you need to log in
Can the same BEM blocks be used on the same or different pages without some of their elements?
It is known that the elements of the BEM block cannot be used in isolation from the block, but can the same blocks on different pages or within the same page be used without some of their elements, or nested blocks OR with a changed sequence of these same elements OR, for example, a nested block in one place it is also an element (mix), and in another place it is only a nested block (that is, in fact, again, the absence of an element)?
Example:
On the main page, we have a header block (header), which contains two other blocks (header-top and header-bottom), which are also its elements:
<header class="header">
<div class="header-top header__header-top">
<a class="logo header-top__logo" href="#">
<img class="logo__img" src="#" alt="Логотип">
</a>
<!-- ... -->
</div>
<div class="header-bottom header__header-bottom">
<nav class="header-bottom__menu">
<ul class="header-bottom__menu-items">
<li class="header-bottom__menu-item"><a href="#" class="header-bottom__menu-link">...</a></li>
<li class="header-bottom__menu-item"><a href="#" class="header-bottom__menu-link">...</a></li>
<li class="header-bottom__menu-item"><a href="#" class="header-bottom__menu-link">...</a></li>
</ul>
</nav>
<!-- ... -->
</div>
</header>
<header class="header">
<div class="header-top header__header-top">
<a class="logo header-top__logo" href="#">
<img class="logo__img" src="#" alt="Логотип">
</a>
<!-- ... -->
</div>
</header>
Answer the question
In order to leave comments, you need to log in
used without some of its elements,
OR with a changed sequence of these very elements
for example, a nested block in one place is also an element (mix)
In this example, I used the block names "header-top" and "header-bottom", is this a mistake?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question