In my web application, I am organizing the CSS based on the BEM convention for better structure and maintainability.
Within this setup, there is a block named item
which consists of three elements: item__section
, item__title
, and item__description
.
To implement these BEM classes effectively, I've structured them as shown below:
<div class="item">
<div class="item__section item__title"> ... </div>
<div class="item__section item__description"> ... </div>
</div>
The class item__section
contains styles that are shared among the different elements.
I'm unsure if this approach adheres to valid BEM standards. Should I consider creating a modifier for item__section
to distinguish between title and description sections?