Answer the question
In order to leave comments, you need to log in
How to indent two or more blocks differently using BEM?
I don't really understand how to make different indentation for two elements? I figured out how to position the block if it is alone, through a mix with the parent element:
<div class="some-parent">
<div class="my-something some-parent__something">...</div>
</div>
<div class="some-parent">
<div class="my-something my-something_offset1">...</div>
<div class="my-something my-something_offset2">...</div>
<div class="my-something my-something_offset3">...</div>
</div>
<div class="some-parent">
<div class="my-something some-parent__something1">...</div>
<div class="my-something some-parent__something2">...</div>
<div class="my-something some-parent__something3">...</div>
</div>
Answer the question
In order to leave comments, you need to log in
If all three elements have different indents, then it is worth wrapping them in different blocks. And to set indents to blocks.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question