Answer the question
In order to leave comments, you need to log in
BEM. How to mark up the text if part of the sentence is highlighted in a different color?
Good afternoon!
The question is simple, of course, but it confuses me.
Such a structure:
<td class="table__col shop-col">
<p class="shop-col__price">
1,2 кг х
<span class="shop-col__price shop-col__price--grey">200 руб.</span>
</p>
</td>
Answer the question
In order to leave comments, you need to log in
To help you figure it out, you need to see the design and understand the context of the problem, but what I see in your name is some kind of tautology from which beginners begin to dislike BEM
How would you react to the decision to leave the span without a class and refer to it by tag, through the parent class?
I recently avoid giving names like item-title )
<td class="table__col shop-col">
<p class="shop-col__info">
<span class="shop-col__weight">1,2 кг</span>
х
<span class="shop-col__price">200 руб.</span>
</p>
</td>
<td class="table__col shop-col">
<p class="shop-col__info">
<span class="shop-col__weight">1,2 кг</span>
х
<span class="shop-col__new-price color-accent">199 руб.</span>
<span class="shop-col__old-price color-grey">200 руб.</span>
</p>
</td>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question