CSS pointer-events

You might say

I placed a decorative gradient overlay on top of the cover image, and now the Play button underneath stopped responding—AI told me to add `pointer-events: none`?

A CSS property that controls whether an element participates in mouse, touch, and hover hit-testing—commonly set to `none` so overlays let clicks pass through.Decorative gradients, watermarks, or fading toasts stacked over a button intercept clicks by default (pointer-events: auto); setting pointer-events: none lets hits pass straight through to the control beneath. It only affects pointer hit-testing and never replaces native disabled—keyboard Tab and Enter can still activate a button styled with pointer-events: none.
pointer-eventspointer-events: noneHit Testing

You can say this to an AI Agent

Ready to paste into Cursor, Claude Code, or Codex
Structured AI Agent prompt

Check why the View Details button under this card overlay does not respond to clicks: set `pointer-events: none` on the decorative gradient and fading toast layers so hits pass through, while setting `pointer-events: auto` on any interactive close button inside the overlay. Also replace any fake-disabled buttons that rely only on `pointer-events: none` with native `disabled`. Verify with both mouse clicks and keyboard Tab + Enter.

Want your Agent to translate plain-language UI ideas automatically?Install free VibeHub Skill →
Oil UI Pro. Push AI’s design skills to the limit. Usability, existing projects and stricter review.
Further reading