Does it make sense in this code if the p tag and all its contents have two styles - text-align:center; color: blue text-align:center; color: blue :

 <div class="block block_right"> <p class="block__title block__title_blue">title <span class="block__date block__date_blue">date</span> </p> </div> 

Is it possible to do so and ask him two necessary styles:

 <div class="block block_right"> <p class="block__text">title <span>date</span> </p> </div> 
  • Read the BEM manual, the second such question from you is Nilsan

1 answer 1

The meaning of the modifiers is to modify (oddly enough :)) the existing block for its reuse in other places. So if you want to make the block blue by default, that’s your right.

If we talk about the use of the first option (with modifiers), then you should correctly name it (in this case, it is more correct to use key-value modifiers):

 <div class="block block_right"> <p class="block__title block__title_color_blue">title <span class="block__date block__date_color_blue">date</span> </p> </div>