Skip to main content

Search rules

Search all UI Guides rules by name, category, or source

interactionsRauno

Replace Tap Highlight

MUST

MUST: If you clear `-webkit-tap-highlight-color`, replace it with your own touch feedback (an `:active` state) — never leave a tap with zero visual confirmation.

Disable the default iOS tap highlight but always replace it with an appropriate alternative

a { -webkit-tap-highlight-color: rgba(0,0,0,0); }
a:active { background: var(--muted); }

Bad

Good

Why it matters

The default iOS tap highlight is often too prominent and doesn't match your design. Disabling it is fine, but you must provide an alternative touch feedback — typically a custom :active state — otherwise users get no visual confirmation of their tap.

Built by Gleb Stroganov, design engineer at Evil Martians.

The rules come from other people's skills and guidelines — Vercel, Rauno Freiberg, @Ibelick, impeccable, Emil Kowalski, Tailwind, RAMS — each one credited on the Sources page. The work here is extraction and wiring: every rule is pulled into one corpus, given a good and a bad example you can operate, a MUST/SHOULD/NEVER rule an agent can paste, and a link back to where it came from.