Answer the question
In order to leave comments, you need to log in
How to override hover inheritance in a media query?
I am writing a responsive menu for a website. I encountered such a problem: in the hamburger menu, hover pops up when hovering over a sub-item, but on mobile devices it is not needed at all. How to get rid of him, I have no idea. I found a solution to this problem on the Internet, but only with the help of preprocessors. But this layout is actually already completely written without preprocessors, and I still don’t know how to typeset with preprocessors, so this option didn’t suit me. I will be grateful for any help.
Code: https://jsfiddle.net/0vo5nw84/5/
Answer the question
In order to leave comments, you need to log in
@media (min-width:1200px) { сюда перенесите ховер };
The preprocessor doesn't do magic, it compiles to the same CSS.
Look at what it turns into after the preprocessor and use it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question