alexmansfield

CSS Hover: Targeting Mouse Input and Ignoring Touch Input

CSS hover states are pretty obviously targeted at mouse inputs, but are applied in strange ways to touch inputs as well. Thankfully, all modern browsers now support input-based media queries. This allows us to apply our hover states only to devices that truly support hover states. Here is the code that makes it work: @media(hover: […]

CSS Hover: Targeting Mouse Input and Ignoring Touch Input Read More »