Web-Facing Change PSA: CSS Highlight Inheritance

30 views
Skip to first unread message

Stephen Chenney

unread,
Oct 30, 2023, 5:17:08 PM10/30/23
to blink-dev

Contact emails

sche...@chromium.org

Specification

https://drafts.csswg.org/css-pseudo-4/#highlight-cascade

Summary

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)



Blink component

Blink>CSS

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

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.



Gecko: Neutral (https://github.com/mozilla/standards-positions/issues/548) emilio@ is active in standards discussions on the issues, but I am not aware of implementation. https://bugzilla.mozilla.org/show_bug.cgi?id=1703963 https://bugzilla.mozilla.org/show_bug.cgi?id=1703961

WebKit: In development (https://github.com/WebKit/standards-positions/issues/95) I have a private email from the Apple engineer tasked with implementing. I don't want to reveal PI.

Web developers: No signals Developer ergonomics is the primary concern motivating highlight inheritance. See https://github.com/w3c/csswg-drafts/issues/2474 for the initial spec discussion related to the behavior of ::selection. See https://bugs.chromium.org/p/chromium/issues/detail?id=1490471 for an example of a user seeing unexpected behavior without this feature.

Other signals:

Ergonomics

None.



Activation

No. This reflects the already active behavior for ::selection in Firefox and the already used behavior for ::highlight, ::spelling and ::grammar.



Security

There are no security risks.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

Devtools supports highlight pseudos and correctly shows the inheritance chain.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

There are no cross-platform issues with implementation and no reason to discriminate on platform.



Is this feature fully tested by web-platform-tests?

Yes

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



Flag name on chrome://flags

experimental-web-platform-features

Finch feature name

HighlightInheritance

Non-finch justification

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.



Requires code in //chrome?

False

Estimated milestones

Shipping on desktop120
DevTrial on desktop118
Shipping on Android120
DevTrial on Android118
Shipping on WebView120


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5090853643354112

Links to previous Intent discussions

Ready for Trial: https://groups.google.com/a/chromium.org/g/blink-dev/c/BbvI5VAguvk


This intent message was generated by Chrome Platform Status.

Chris Harrelson

unread,
Oct 30, 2023, 7:27:20 PM10/30/23
to Stephen Chenney, blink-dev
Hi Stephen,

Just checking: were you intending to send an intent-to-ship or a PSA?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGsbWzSw%3DejPhEoeZW6qVZL%3DN%2Bys4Mo1K7Zcd4J-yTiWJapz4Q%40mail.gmail.com.

Stephen Chenney

unread,
Oct 30, 2023, 8:17:52 PM10/30/23
to Chris Harrelson, blink-dev
The new launch process workflow wouldn't let me do an Intent to Ship for this one, at least not without some as-yet-unknown gate based on this email. I've filed an issue to get it resolved.

It would be great if the API owners could treat this as an intent to ship, but I'm also fine resending it with a different title.

Manuel Rego Casasnovas

unread,
Oct 31, 2023, 5:49:06 AM10/31/23
to Stephen Chenney, Chris Harrelson, blink-dev
Hi Stephen,

Please send a new email in a separated thread for the intent to ship.

Thanks,
Rego

On 31/10/2023 01:17, Stephen Chenney wrote:
> The new launch process workflow wouldn't let me do an Intent to Ship for
> this one, at least not without some as-yet-unknown gate based on this
> email. I've filed an issue to get it resolved.
>
> It would be great if the API owners could treat this as an intent to
> ship, but I'm also fine resending it with a different title.
>
> On Mon, Oct 30, 2023 at 7:27 PM Chris Harrelson <chri...@chromium.org
> <mailto:chri...@chromium.org>> wrote:
>
> Hi Stephen,
>
> Just checking: were you intending to send an intent-to-ship or a PSA?
>
> On Mon, Oct 30, 2023 at 2:17 PM Stephen Chenney
> <sche...@chromium.org <mailto:sche...@chromium.org>> wrote:
>
>
> Contact emails
>
> sche...@chromium.org <mailto:sche...@chromium.org>
>
>
> Specification
>
> https://drafts.csswg.org/css-pseudo-4/#highlight-cascade
> <https://drafts.csswg.org/css-pseudo-4/#highlight-cascade>
>
>
> Summary
>
> 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
> <https://drafts.csswg.org/css-pseudo-4/#highlight-cascade>)
>
>
>
> Blink component
>
> Blink>CSS
> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3ECSS>
>
>
> TAG review
>
> None
>
>
> TAG review status
>
> Not applicable
>
>
> Risks
>
>
>
> Interoperability and Compatibility
>
> 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.
>
>
>
> /Gecko/: Neutral
> (https://github.com/mozilla/standards-positions/issues/548
> <https://github.com/mozilla/standards-positions/issues/548>)
> emilio@ is active in standards discussions on the issues, but I
> am not aware of implementation.
> https://bugzilla.mozilla.org/show_bug.cgi?id=1703963
> <https://bugzilla.mozilla.org/show_bug.cgi?id=1703963>
> https://bugzilla.mozilla.org/show_bug.cgi?id=1703961
> <https://bugzilla.mozilla.org/show_bug.cgi?id=1703961>
>
> /WebKit/: In development
> (https://github.com/WebKit/standards-positions/issues/95
> <https://github.com/WebKit/standards-positions/issues/95>) I
> have a private email from the Apple engineer tasked with
> implementing. I don't want to reveal PI.
>
> /Web developers/: No signals Developer ergonomics is the primary
> concern motivating highlight inheritance. See
> https://github.com/w3c/csswg-drafts/issues/2474
> <https://github.com/w3c/csswg-drafts/issues/2474> for the
> initial spec discussion related to the behavior of ::selection.
> See
> https://bugs.chromium.org/p/chromium/issues/detail?id=1490471
> <https://bugs.chromium.org/p/chromium/issues/detail?id=1490471> for an example of a user seeing unexpected behavior without this feature.
>
> /Other signals/:
>
>
> Ergonomics
>
> None.
>
>
>
> Activation
>
> No. This reflects the already active behavior for ::selection in
> Firefox and the already used behavior for ::highlight,
> ::spelling and ::grammar.
>
>
>
> Security
>
> There are no security risks.
>
>
>
> WebView application risks
>
> Does this intent deprecate or change behavior of existing APIs,
> such that it has potentially high risk for Android WebView-based
> applications?
>
> None
>
>
>
> Debuggability
>
> Devtools supports highlight pseudos and correctly shows the
> inheritance chain.
>
>
>
> Will this feature be supported on all six Blink
> platforms (Windows, Mac, Linux, Chrome OS, Android, and
> Android WebView)?
>
> Yes
>
> There are no cross-platform issues with implementation and no
> reason to discriminate on platform.
>
>
>
> Is this feature fully tested by web-platform-tests
> <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>?
>
> Yes
>
> https://wpt.fyi/results/css/css-pseudo?label=experimental&label=master&aligned <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 <https://wpt.fyi/results/css/css-highlight-api?label=experimental&label=master&aligned>
> https://groups.google.com/a/chromium.org/g/blink-dev/c/BbvI5VAguvk <https://groups.google.com/a/chromium.org/g/blink-dev/c/BbvI5VAguvk>
>
>
> This intent message was generated by Chrome Platform Status
> <https://chromestatus.com/>.
>
> --
> You received this message because you are subscribed to the
> Google Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGsbWzSw%3DejPhEoeZW6qVZL%3DN%2Bys4Mo1K7Zcd4J-yTiWJapz4Q%40mail.gmail.com <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGsbWzSw%3DejPhEoeZW6qVZL%3DN%2Bys4Mo1K7Zcd4J-yTiWJapz4Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGsbWzQkQowSMhqZfLDQYO%2BqvWNK3kkAwSYE%3DatAJFrvb_idOw%40mail.gmail.com <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGsbWzQkQowSMhqZfLDQYO%2BqvWNK3kkAwSYE%3DatAJFrvb_idOw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages