Answer the question
In order to leave comments, you need to log in
How to correctly write a common modifier for BEM blocks?
Hello, at the moment I'm trying to apply BEM in projects. There is a simple block layout shown below. Can I add a class to block-1 and block-2, such as fullwidth, which is common to some of the blocks on the site, to add multiple styles to multiple different blocks? Or does bam not allow this and should I use a modifier for both blocks block-1_fullwidth and block-2_fullwidth?:
<div class="block-1">
<div class="block-1__element"></div>
<div class="block-1__element"></div>
</div>
<div class="block-2">
<div class="block-2__element"></div>
<div class="block-2__element"></div>
</div>
Answer the question
In order to leave comments, you need to log in
An entity that defines the appearance, state, or behavior of a block or element.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question