R
R
rusglov2018-04-05 07:23:07
css
rusglov, 2018-04-05 07:23:07

How to adapt this block to BEM?

There is a product block on 2 different pages of the site. Their appearance is identical, but when the site is adapted, their appearance diverges. What is the best way to implement this adaptation? Throw a modifier like "product--view-md" on the product, or change the view through mixes from the parent?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nik_Set_7, 2018-04-05
@Nik_Set_7

Yes, add modifiers if they are ideologically the same.
If they look the same, but in fact contain different content, then it is better to create two separate blocks.

M
Mikhail Rerberg, 2018-04-05
@NooNoo

product-card, for example, for the general style of the blocks.
product-card--newstyle - unique style for a block on a specific page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question