With CSS Highlight Inheritance, the CSS Highlight pseudo classes, such as ::selection and ::highlight, inherit their properties through the pseudo highlight chain, rather than the element chain. The result is a more intuitive model for inheritance of properties in highlights. Specifically, "When any supported property is not given a value by the cascade ... its specified value is determined by inheritance from the corresponding highlight pseudo-element of its originating element’s parent element." (https://drafts.csswg.org/css-pseudo-4/#highlight-cascade)
The feature is still under implementation in other browser engines, but the standards are well developed and there is general agreement on the spec. I think compat risk is very limited at this time.
None.
No. This reflects the already active behavior for ::selection in Firefox and the already used behavior for ::highlight, ::spelling and ::grammar.
There are no security risks.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
Devtools supports highlight pseudos and correctly shows the inheritance chain.
There are no cross-platform issues with implementation and no reason to discriminate on platform.
https://wpt.fyi/results/css/css-pseudo?label=experimental&label=master&aligned highlight-cascade-* covers this functionality. There are additional WPT that make use of the feature in https://wpt.fyi/results/css/css-highlight-api?label=experimental&label=master&aligned
The feature was enabled as experimental way back in M111 and stayed that way until M116 when it was switched back to test, and it is back on experimental for M118. Developers have significant experience with the feature enabled via experimental web platform features. There is no value to running a finch trial given the large amount of existing experience with the feature.
Shipping on desktop | 120 |
DevTrial on desktop | 118 |
Shipping on Android | 120 |
DevTrial on Android | 118 |
Shipping on WebView | 120 |