W
W
wakenbyWork2021-06-23 18:19:10
HTML
wakenbyWork, 2021-06-23 18:19:10

What is the best way to write indents for BEM blocks?

In general, I was advised to write indents for bem blocks like this: 1) Is it a good practice to do this? 2) If the indents change in the adaptive, is it normal to write this?:

<div class="bem-block mt-20 mb-40"></div>



.mb-40 {
    margin-bottom: 40px;
    
    @media (max-width: 767px) {
      margin-bottom: 20px;
    }
  }


After all, not all blocks with a class mb-40in the adaptive can change the indent to a smaller one, and there will be confusion ((

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