[css-masking] Impact of masks on hit-testing needs to be specified · Issue #11339 · w3c/csswg-drafts (original) (raw)
Currently, CSS Masking says nothing about whether masks impact hit-testing (i.e. if clicks on the masked-out part of the content are treated as a click on the element).
Chrome and Firefox do consult the mask for hit-testing; WebKit does not. Test:
https://codepen.io/therealpaulplay/pen/wBwGdXX
This was reported as a bug in WebKit.
CSS has historically shied away from specifying hit-testing, but I think this one is important. Also of note is that the spec does talk about the impact of clip-path on hit-testing.