P
P
pavelsa2020-06-05 14:12:27
BEM
pavelsa, 2020-06-05 14:12:27

Are the BEM classes named correctly?

The class names of the ul li tags are very confusing. There is a site header (header), it will have a left side and a right side, in the left: a logo and a menu that should not be used anywhere else outside the header (the menu will be with icons), did I name the classes correctly? And also, can a modifier be assigned to a container, and positioning can be set in this modifier?

<header class="header">
  <div class="header__top">
    <div class="container container--top">
      <div class="header__top-left">
        <div class="logo">Логотип</div>
        <nav class="header__top-menu">
          <ul class="header__top-menu-list">
            <li class="header__top-menu-item">Первый</li>
            <li class="header__top-menu-item">Второй</li>
          </ul>
        </nav>
      </div>
      <div class="header__top-right">
        <!-- Правая часть хедер -->
      </div>
    </div>
  </div>
</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Olegarh1a, 2020-06-05
@Olegarh1a

Take off the caps. As for me, you have a lot of blocks. Header > container > div - all elements are positioned in it, although again it depends on the content

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question