S
S
SvetlanaDubovik2017-12-08 12:09:52
BEM
SvetlanaDubovik, 2017-12-08 12:09:52

How to create a BEM block structure correctly?

Let's say there is a section block, it has several articles.

<section class="blog">
  <article>
    <h1> Заголовок </h1>
    <p> Какое-то описание </p>
  </article>
<article>
    <h1> Заголовок </h1>
    <p> Какое-то описание </p>
  </article>
<article>
    <h1> Заголовок </h1>
    <p> Какое-то описание </p>
  </article>
</section>

What is the best way to proceed in this case? Article will be a blog block element? But, given that there can be a lot of these articles, it is better to put it in a separate block. Those. it turns out I need to create 2 files with a description of the properties of these blocks. What if section has no rules? Remove section and leave only articles?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question