Answer the question
In order to leave comments, you need to log in
How is it correct according to the BEM methodology, here I have a logo and it is in the center of the page with an indent from the top, what should I put in Modifiers?
How is it correct according to the BEM methodology, here I have a logo and it is in the center of the page with an indent from the top, what should I put in Modifiers?
It must be taken into account that this block can be used somewhere else in the project, and there will be other sizes of the logo and other indents. Here, the help of more experienced comrades is needed.
<div class="logo-log-in logo-log-in-size-large logo-log-in_layout">
<img class="logo-log-in__img" src="img/Logo.svg" alt="Logo Mercury Developers">
</div>
Answer the question
In order to leave comments, you need to log in
Everything is done very simply. You have header-block
, it contains your logotype
.
You make yours logotype
a separate element, prescribe common styles for it, without positioning and binding to the structure header-block
. As a result:
.header-block ---------------------------> Ваш основной бэм блок
.header-block__logotype logotype ------------> где, header-block__logotype
(вы прописываете позиционирование), logotype - у вас независимый элемент).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question