Poking at a new proposal that would allow an element to match an element when the pointer gets :near() it by a certain amount.

https://css-tricks.com/potentially-coming-to-a-browser-near-you/

Potentially Coming to a Browser :near() You | CSS-Tricks

Danny has several ideas for how we could use :near(), a proposed pseudo-class that detects when the pointer is near an element.

CSS-Tricks
Just one example to illustrate the point... the article has several other ideas.