K
K
kid-programmer2015-10-16 14:31:11
css
kid-programmer, 2015-10-16 14:31:11

BEM. Block and its modifier?

There are several different headers on the site, would it be correct to make a .header block with modifiers that change it to the desired style.

<div class="page">
  <div class="page__header">
    <h1 class="header header_page">Заголовк страницы</h1>
  </div>
  <div class="page__slider">
    <div class="slider">
          <div class=slider__item> 
            <h1 class="header header_slider">Заголовк слайдера</h1>
          </div>
    </div>
  </div>
<div>

.header{}
.header_slider{}
.header_page{}

Roughly speaking, .header will be empty and all styles will be in .header_slider and .header_page
.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Think With Your Head, 2015-10-16
@kid-programmer

Or maybe you should not give up the context and start working normally already?)
So much time is spent on comprehending the zen of BEM...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question