---
title: "Tailwind 3 hover styles stick on touch (tailwind/hover-capability)"
description: "Without hoverOnlyWhenSupported, hover: applies on tap and stays until the next tap on phones (Tailwind 4 does this by default)."
url: http://localhost:4173/rules/tailwind/hover-capability
updated: 2026-11-11
---

# Tailwind 3 hover styles stick on touch

> `tailwind/hover-capability` is a vetd rule. It flags: Tailwind 3 hover styles stick on touch. It runs on every `check`, together with the TypeScript check.

| Fact | Value |
| --- | --- |
| Rule id | `tailwind/hover-capability` |
| Severity | warning |
| Group | Tailwind CSS |
| Tags | correctness |

## Why it matters

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

## How to fix it

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

## Credit

Based on work by:

- [Tailwind Labs](https://tailwindcss.com): Tailwind 4 applies hover styles only on devices that support hover, and the v3 hoverOnlyWhenSupported flag opts into the same behavior.

## References

- [Hover, focus, and other states](https://tailwindcss.com/docs/hover-focus-and-other-states), Tailwind CSS
- [Upgrade guide](https://tailwindcss.com/docs/upgrade-guide), Tailwind CSS
- [hover](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/hover), MDN Web Docs

## Related rules

- [`tailwind/removed-in-v4`](http://localhost:4173/rules/tailwind/removed-in-v4.md)

## Get this text from vetd

MCP: call `explain` with `{ "diagnosticId": "tailwind/hover-capability" }`. CLI: `npx vetd explain tailwind/hover-capability`.

---

[All 92 rules](http://localhost:4173/rules.md) · Previous: [`tailwind/removed-in-v4`](http://localhost:4173/rules/tailwind/removed-in-v4.md) · Next: [`tailwind/arbitrary-z-index`](http://localhost:4173/rules/tailwind/arbitrary-z-index.md)
