D
D
Dmitry Kravchenko2015-10-27 14:52:56
css
Dmitry Kravchenko, 2015-10-27 14:52:56

How to organize BEM with adaptability?

Good day everyone!
There is a menu in the footer of the site, which should be in a row on large screens and in a column on small ones.
What am I doing:

.menu{}
.menu-item{}
.menu-item-h{/*стили для горизонтальных элементов*/}
.menu-item-v{/*стили для вертикальных элементов*/}

How can I specify that on a screen less than 768px I want to see a vertical menu, otherwise - a horizontal one?
These same styles are used elsewhere.
My thoughts on this:
.menu-item-h_min_sm{/*стили с нужным медиазапросом*/}

This results in code duplication.
Thank you all in advance for your replies.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Sergeevich, 2015-10-27
@CheckOneTwo

Some kind of wrong BEM

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question