Tailwind 3 hover styles stick on touch

tailwind/hover-capabilitywarningcorrectness

Why it matters

Without hoverOnlyWhenSupported, hover: applies on tap and stays until the next tap on phones (Tailwind 4 does this by default).

Fix

tailwind.config: future: { hoverOnlyWhenSupported: true }.

Credit

  • From Tailwind Labs

    Tailwind 4 applies hover styles only on devices that support hover, and the v3 hoverOnlyWhenSupported flag opts into the same behavior.

References