TL; DR: It’s @media(hover: hover) and (pointer: fine) {}, but the specification has not been finalized yet.

There have been problems with the :hover pseudo-class ever since the first web browser was installed on a touchscreen device. Of course there were solutions, but none of those were the solution. With the new Level 4 Media Queries, this issue seems like it’s solved for good.

‘Uhm… what’s the problem again?’

So let’s say you simply added a :hover styling to an element of your webpage, so it gets some styling when the mouse hovers over it. Easy.

Mezo Istvan

Web developer at 🌍 and Miro Digital Technologies ⚙️. More at 📝

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store