[csswg-drafts] [CSS-Pseudo] Styling one-vs-many-vs-all with pseudo classes on highlight pseudos (#11727)

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

== [CSS-Pseudo] Styling one-vs-many-vs-all with pseudo classes on highlight pseudos ==
In Issue https://github.com/w3c/csswg-drafts/issues/7647 it was resolved to support pseudo-classes on pseudo-highlights. The canonical use case being hover on custom highlights.

Considering, for example, the code highlighting scenario, there are situations in which `::highlight(a):hover` would only apply to the one highlighted range that was hovered (i.e. a single variable). But there are also situations in which all the ranges with that highlight would be hover-styled (to show all uses of a variable, for instance).

Both of these use-cases should be supported.

One question is whether the latter (highlight all) can be done in script by detecting the hover state and modifying the highlight style. Maybe that is enough.

As to solutions, one proposal is a method for grouping ranges. See the discussion on Issue #7647 for more details.

Maybe group IDs could be given when registering the highlights, as an optional argument.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11727 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:38:24 UTC