Intent to Remove: CSS property -webkit-highlight

351 views
Skip to first unread message

Stephen Chenney

unread,
Jun 29, 2023, 1:30:56 PM6/29/23
to blink-dev, Manuel Rego Casasnovas, spect...@igalia.com

Contact emails

sche...@chromium.orgspect...@igalia.com

Explainer

None

Specification

None

Summary

The CSS property -webkit-highlight is intended to highlight text, but was never standardized. It has no visible effect in chromium (it is parsed but never used in rendering content). The property was removed from WebKit in 2014 (https://bugs.webkit.org/show_bug.cgi?id=128456), has been marked as deprecated on MDN, and has been replaced recently with the CSS Highlight Pseudo spec (https://www.w3.org/TR/css-pseudo-4/#highlight-pseudos). The property seems to be used in a single third-party library (https://www.audioeye.com/) where it is always set to the value "none".



Blink component

Blink>CSS

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

Improving interop and compat. No other browser supports this feature and the feature has no effect.



Gecko: N/A Never shipped.

WebKit: Removed in 2014. (https://bugs.webkit.org/show_bug.cgi?id=128456

Web developers: No signals. The property is essentially undiscoverable.

Other signals:

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



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

No

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

No

Flag name on chrome://flags



Finch feature name



Non-finch justification

The feature does nothing, so the behavior of web content cannot change. There are no crash concerns with the code being removed.

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1086089

Estimated milestones

Shipping on desktop117
Shipping on Android117
Shipping on WebView117


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/5171295490146304

Links to previous Intent discussions



This intent message was generated by Chrome Platform Status.

Rick Byers

unread,
Jun 30, 2023, 3:33:57 PM6/30/23
to Stephen Chenney, blink-dev, Manuel Rego Casasnovas, spect...@igalia.com
Removing a prefixed API with no behavior should be trivial, thanks for the cleanup Stephen :-)

However, the UseCounter is surprisingly high with lots of hits in HA: https://chromestatus.com/metrics/css/timeline/popularity/251. Just confirming that you looked at a sample of those hits and found they were all using this 3P library?

LGTM1



--
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/CAGsbWzRjoatsXASAmVugMynmGDubKHaEVpD2_dQOxGn0rK71zA%40mail.gmail.com.

Mike Taylor

unread,
Jun 30, 2023, 3:36:48 PM6/30/23
to Rick Byers, Stephen Chenney, blink-dev, Manuel Rego Casasnovas, spect...@igalia.com

https://github.com/search?type=code&q=-webkit-highlight+language%3ACSS&l=CSS shows this has been used elsewhere (but I guess has just been useless in clank?).

That said, LGTM2.

Stephen Chenney

unread,
Jun 30, 2023, 3:47:16 PM6/30/23
to Mike Taylor, Rick Byers, blink-dev, Manuel Rego Casasnovas, spect...@igalia.com
Thanks Mike for looking up github usage. It does indeed do nothing and the github refs are all -webkit-highlight: none or initial, which I have to assume was also none. We checked many of the http-archive links and they were all the one a11y library usage, all value none.

Cheers,
Stephen.

Yoav Weiss

unread,
Jul 2, 2023, 4:33:42 PM7/2/23
to Stephen Chenney, Mike Taylor, Rick Byers, blink-dev, Manuel Rego Casasnovas, Valerie Young

Rick Byers

unread,
Jul 6, 2023, 9:32:16 AM7/6/23
to Yoav Weiss, Stephen Chenney, Mike Taylor, blink-dev, Manuel Rego Casasnovas, Valerie Young
On Sun, Jul 2, 2023 at 4:33 PM Yoav Weiss <yoav...@chromium.org> wrote:
LGTM3

On Fri, Jun 30, 2023, 21:47 Stephen Chenney <sche...@chromium.org> wrote:
Thanks Mike for looking up github usage. It does indeed do nothing and the github refs are all -webkit-highlight: none or initial, which I have to assume was also none. We checked many of the http-archive links and they were all the one a11y library usage, all value none.

Great, glad to hear it!

I tried to come up with any plausible way a website could be broken as a result of us no longer parsing this behavior-less property and couldn't come up with anything at all credible. It's technically observable through parsing, but given the analysis done and state of other engines, it seems exceedingly unlikely any code would depend on it parsing. So for the record, I don't think this change qualifies as having any real web compat risk (any more than our constant stream of low risk bug-fixes) and so is IMHO not covered by the flag guarding requirement It's not really "deprecating" an API given it's just a CSS property that did nothing. Of course, we still learn new things about the way the web has come to depend on chromium implementation details, so if I'm wrong and you do encounter any breakage, please follow-up here. If there's any doubt we could always add basic parsing back as an "experimental" feature which could be flipped on via finch.

slightlyoff via Chromestatus

unread,
Jul 19, 2023, 11:54:37 AM7/19/23
to blin...@chromium.org
LGTM3
Reply all
Reply to author
Forward
0 new messages