[csswg-drafts] [CSS Pseudo] Hit test regions for pseudo-classes on highlight pseudo-elements (#11726)

schenney-chromium has just created a new issue for https://github.com/w3c/csswg-drafts:

== [CSS Pseudo] Hit test regions for pseudo-classes on highlight pseudo-elements ==
In Issue #7647 it was resolved to support pseudo-classes on pseudo-highlights. The canonical use case being hover on custom highlights.

How should we define the active region for detecting the pseudo-class trigger state, when it may be that only a portion of the element is highlighted by the pseudo-highlight? My initial proposal is that the highlighted area should trigger the pseudo state.

For example, if you have code highlighting turned on for a single `pre`, such that different ranges are highlighted with different highlights, a `pre::highlight(blah):hover` would only trigger when that specific highlight area was hovered.

If you have `#tooltip:hover` and `::selection::hover` and you selected part of the tooltip, then hovered, the selection would match `::selection::hover` and the rest of the element would match `#tooltip:hover`.

Thought needs to go into how this would be implemented.

@dbaron @emilio @tabatkins 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11726 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 16 February 2025 22:23:24 UTC