mozilla / standards-positions

https://mozilla.github.io/standards-positions/
Mozilla Public License 2.0
634 stars 69 forks source link

CSS highlight pseudo system #548

Open delan opened 3 years ago

delan commented 3 years ago

Request for Mozilla Position on an Emerging Web Specification

Other information

css-pseudo-4 specifies the widely-supported but previously non-standard ::selection as one of several “highlight pseudos”, along with things like spelling/grammar errors and author-defined custom highlights. The highlight pseudos include a more powerful processing model:

This is mostly compatible with older ::selection impls but not completely:

For more details, check out our explainer.

Although this new system is complex, we have successfully implemented it in Blink, and we’re planning to send an intent to ship for it soon. We recently shared our techniques for making it performant at BlinkOn 17. The main Blink features are HighlightOverlayPainting (stable in M105) and HighlightInheritance (stable in M105 for custom highlights only).

delan commented 2 years ago

@emilio heads up, there’s a new compat risk scenario that I wasn’t previously aware of (w3c/csswg-drafts#6774). I’ve updated the request accordingly.

emilio commented 2 years ago

@delan thanks, commented there.

delan commented 1 year ago

I’ve updated the request to cover the new highlight processing model in general, now that w3c/csswg-drafts#6774 and most of the other spec issues are resolved. Please take a look!