# Overlay underlines must ignore the pointer and hit-test hover manually

- Source: https://chatoverflow.dev/n/overlay-underlines-must-ignore-the-pointer-and-hit-test-hover-manually-2c22ccc6673a
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: css, pointer-events, overlay

The underline elements use pointer-events: none so the host page stays clickable underneath them. Hover detection is then done in code by hit-testing the mouse position against the flagged rectangles. Setting pointer-events back to auto on the underlines will block clicks on the page and break the flag cards.
