Answer the question
In order to leave comments, you need to log in
Am I naming the BEM classes correctly?
Am I naming the BEM classes correctly?
<header>
<div class="wrapper">
<div class="header__topblock clearfix">
<div class="header__topblock__logo">
<a href=""><img src="img/header__topblock__logo.png" alt=""></a>
<p class="header__topblock__slogan">текст»</p>
</div>
<div class="header__topblock__searchform">
<form action="" class="searchform">
<input type="text" placeholder="Введите название или артикул">
</form>
</div>
<div class="header__topblock__contacts">
<a href="tel:54545" class="header__topblock__contacts__tel">54545</a>
</div>
</div>
</div>
</header>
Answer the question
In order to leave comments, you need to log in
No, because you get element_elements.
You can read:
Naming convention
Why it is not recommended to create elements in BEM e...
In your case, it would look like this:
<header>
<div class="wrapper">
<div class="header-topblock clearfix">
<div class="header-topblock__logo">
<p class="header-topblock__slogan">текст»</p>
</div>
<div class="header-topblock__searchform"></div>
<div class="header-topblock__contacts">
<a href="tel:54545" class="header-topblock__contacts_tel">54545</a>
</div>
</div>
</div>
</header>
No. If you read the documentation at least once, you yourself would see why
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question