Answer the question
In order to leave comments, you need to log in
Does BEM require inline elements to be wrapped in an additional block tag?
Hello.
I watched this video about the BEM layout methodology: https://youtu.be/q1tdG7EIGa8
In this video , the , and (inline and inline-block) elements are wrapped by the author in an additional .
Example #1:<button>
<img>
<a>
<div>
<!-- Вместо -->
<img class="logo header__logo" src="pic.jpg">
<!-- Автор указывает -->
<div class="logo header__logo">
<img class="logo__img" src="pic.jpg">
</div>
<!-- Вместо -->
<a class="phone header__phone" href="">+1 (800) 888-88-88</a>
<!-- Автор указывает -->
<div class="header__phone">
<a class="phone" href="">+1 (800) 888-88-88</a>
</div>
<!-- Вместо -->
<button class="button header__button">Позвонить</button>
<!-- Автор указывает -->
<div class="header__button">
<button class="button">Позвонить</button>
</div>
<div>
Answer the question
In order to leave comments, you need to log in
in general, everything used to be made up on divs. but now it is not very popular. so if you can do without the extra div - don't use this div.
ps perhaps the author of your course on YouTube is just a seasoned layout designer with 20+ years of experience and doesn't want to quit layout on divas.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question