Answer the question
In order to leave comments, you need to log in
Is it possible in BEM to use the same modifier for a block and an element?
Can you please tell me how to correctly lay out such blocks according to BEM:
There are blocks of the same type, they differ only in the mutual arrangement of elements, as in the example:
https://jsfiddle.net/b19chkdf/
I made a modifier for each block block - block_dir_row and block_dir_column. The problem is that some elements (.block__title) should have different margins, in the attached fiddle - 2 and 20 pixels. According to BEM, the external geometry is set through the parent block. But they have the same parent block. So far, I've done this: I've given them the same modifiers as the parents, and made indents through them (see fiddle). Is it correct?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question