- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Wed, 29 Jan 2025 22:35:29 +0000
- To: public-css-archive@w3.org
Elaborating on my comments during the meeting: * We *very intentionally* don't expose the actual structure of the highlights right now; properties are limited to only things that don't care about whether the highlight is one box or multiple ones. It's probably good to preserve that, since a single "logical" highlight might be forced to be multiple Ranges (highlighting across a shadow tree, or highlighting across a table column, etc). * So the most reasonable default, imo, is to have `::highlight(foo):hover` style *all* the Ranges in the "foo" highlight set when any of them are hovered. That avoids exposing the Range structure. * But there's obvious use-cases for wanting to give hover styles to just the single hovered "thing". To allow for this, while still avoiding exposing the gory details of "one highlight" being multiple Ranges sometimes, we could define a new "range group" concept, and then allow selecting a single "top-level" range in the highlight set. * dbaron suggested we could just create the "range group" concept for UA use, but don't necessarily need to expose that to JS. (But we could, certainly, just have a CompositeRange interface that takes a list of Ranges.) * Whether the *base* version of the selector is the one that selects a single "logical range" or selects all ranges, I'm ambivalent about. So long as we definitely define that UAs must use the "range group" concept for things like ::selection, it should be fine either way. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7647#issuecomment-2623031107 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 29 January 2025 22:35:30 UTC