When should you use hover and pointer media queries?

Use hover and pointer media queries to adapt optional interactions to the capabilities of the user’s primary input. hover: hover indicates that the primary pointing device can conveniently hover, while pointer: fine indicates accurate pointing. They should improve an already usable base experience.
Do not use hover as the only way to reveal essential controls or information. Touch users, keyboard users and hybrid devices may not trigger it. Put the action in the DOM and make it available through focus or activation, then add hover styling for devices that support it.
@media (hover: hover) and (pointer: fine) {
.card-action { opacity: 0; }
.card:hover .card-action,
.card:focus-within .card-action { opacity: 1; }
}
Use any-hover and any-pointer when the presence of any available device matters, but be careful with hybrids. A laptop may have a fine trackpad and a coarse touch screen. The interface still needs targets and spacing that work for touch.
Test keyboard, mouse, touch and stylus without assuming one query maps to a device category. Capability values can change when accessories connect. CSS should handle presentation, while JavaScript behavior should remain robust if the input method changes during the session. Verify the final behavior across the full width range, including the spaces between preset devices and design breakpoints. Long labels, translated copy and enlarged text often reveal constraints that short demo content does not exercise. Recheck the component after font, spacing or browser-support changes. Responsive failures often return when a shared token changes, so the test should cover the limiting content state instead of one ideal screenshot.