Intent to Ship: Unprefix -webkit-background-clip for "text" and make it an alias

179 views
Skip to first unread message

Daniil Sakhapov

unread,
Sep 26, 2023, 10:33:27 AM9/26/23
to blink-dev

Contact emails

sakh...@chromium.org

Specification

https://drafts.csswg.org/css-backgrounds/#background-clip

Summary

It allows to use the unprefixed version for background-clip: text and makes -webkit-background-clip an alias for background-clip. Also, it drops support for non-suffixed keywords (content, padding and border) for better round-trip with alias.


Blink component

Blink>CSS

Risks


Interoperability and Compatibility

None


Gecko: Shipped/Shipping Firefox doesn't support keywords with no suffix for prefixed version

WebKit: Shipped/Shipping Safari supports keywords with no suffix (border, content, padding), but only for prefixed version

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

Yes

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

wpt.fyi/css/css-backgrounds/background-clip/clip-text-dynamic-2.html

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5125388091260928

This intent message was generated by Chrome Platform Status.

Thomas Steiner

unread,
Sep 26, 2023, 6:04:54 PM9/26/23
to Daniil Sakhapov, blink-dev
Is there any interest in doing the same for -webkit-text-fill-color? The two get typically used in combination for gradient effects: https://github.com/tomayac/blogccasion/blob/6ee3722011661db7a0c95c4379d7905bd8e95404/css/main.css#L100-L113. (See any of the headings on https://blog.tomayac.com/ for an example.)

--
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/CAH3Z928OknOBtR09iMg2rc%2B8qst3%2Bk7Pek%2Bh_hmWA-fDxM8yVw%40mail.gmail.com.

一丝

unread,
Sep 26, 2023, 8:38:16 PM9/26/23
to blink-dev, tste...@google.com, blink-dev, sakh...@chromium.org
I think the correct specification address would be https://drafts.csswg.org/css-backgrounds-4/#typedef-bg-clip

In css-backgrounds-4 also added `border` value, should we support it when removing the prefix? Maybe this needs to be discussed further by the CSSWG.

Yoav Weiss

unread,
Sep 27, 2023, 3:49:35 AM9/27/23
to 一丝, blink-dev, tste...@google.com, sakh...@chromium.org

Daniil Sakhapov

unread,
Sep 27, 2023, 3:53:49 AM9/27/23
to blink-dev, Yoav Weiss, blink-dev, tste...@google.com, Daniil Sakhapov, 一丝
Also forgot to mention: the highest use counter for unsuffixed keyword is 0.08 - and among those I've analyzed 80% of websites and all of them use suffixed *-box version, so it's safe to remove.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Daniel Bratell

unread,
Sep 27, 2023, 10:55:53 AM9/27/23
to Daniil Sakhapov, blink-dev, Yoav Weiss, tste...@google.com, 一丝

It allows to use the unprefixed version for background-clip: text and makes -webkit-background-clip an alias for background-clip. Also, it drops support for non-suffixed keywords (content, padding and border) for better round-trip with alias.

Can you clarify exactly what this means? I'm perfectly fine with lgtm-ing unprefixing and adding a (temporary?) alias for the old keyword, but if we start removing support for keywords we need to be more careful and I want to be sure I understand.

/Daniel

Daniil Sakhapov

unread,
Sep 28, 2023, 1:16:34 PM9/28/23
to blink-dev, Daniel Bratell, Yoav Weiss, tste...@google.com, 一丝, Daniil Sakhapov
Sure, I'm saying that old -webkit-background-clip works with keywords: border, content, padding. The new one - background-clip works with border-box, content-box, padding-box.
So, per compat spec -webkit-background-clip should be alias to background-clip. But since the keywords are different, in order to handle round trip better (e.g. setting -webkit-background-clip to content would read back content-box, as it's an alias to background-clip), we want to drop support of old keywords without -box for -webkit-background-clip. To see how bad that would we've set up use counters. 
The biggest one is 0.08%. I've manually checked 80% of the websites reported by that use counter, but found that all of them use *-box keywords, and only one uses -webkit-background-clip: content.
So I think it's safe to remove support for old keywords.
Hope it's more clear now.

Mike Taylor

unread,
Oct 2, 2023, 5:16:18 PM10/2/23
to Daniil Sakhapov, blink-dev, Daniel Bratell, Yoav Weiss, tste...@google.com, 一丝

LGTM2, can you also please request reviews for the other categories in chromestatus (and file any relevant issues in the compat spec, if needed)?

Daniel Bratell

unread,
Oct 4, 2023, 11:57:29 AM10/4/23
to Mike Taylor, Daniil Sakhapov, blink-dev, Yoav Weiss, tste...@google.com, 一丝

LGTM3

/Daniel

Levai Ferencz

unread,
Oct 12, 2023, 12:04:26 PM10/12/23
to blink-dev, Daniel Bratell, Yoav Weiss, tste...@google.com, 一丝, Mike Taylor, Daniil Sakhapov
Hi,

We have the same problem as described here:


When will be fixed this ?

Ferencz Levai
Creatopy

LGTM3

/Daniel

--
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.
Reply all
Reply to author
Forward
0 new messages