W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

[csswg-drafts] [css-color-4] [css-backgrounds-4] text system color conflicts with background-clip (#4465)

From: Emilio Cobos Álvarez via GitHub <sysbot+gh@w3.org>
Date: Tue, 29 Oct 2019 09:53:47 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-513805058-1572342826-sysbot+gh@w3.org>
emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4] [css-backgrounds-4] text system color conflicts with background-clip ==
https://drafts.csswg.org/css-backgrounds-3/#propdef-background allows you to specify a `background-clip` value using one of the `<box>` bits in the syntax..

backgrounds-4 defines `background-clip: text`, which multiple browsers implement and ship from a long time ago. It is my intuition that if we allow to set background-clip in the background shorthand, we should also be able to set `background-clip: text`.

Firefox does this already: `background: linear-gradient(red, blue) text` parses as `background-image: linear-gradient(..); background-clip: text; background-*: initial`.

The system colors introduced in css-color-4 (#4091) include a `Text` value, which conflicts with `background-clip: text` in the background shorthand.

That means that the previous example will start parsing as `background-color: text` rather than `background-clip: text`, which is a significant behavior change.

So we have multiple options I guess:

 * Make this behavior change (as I think Gecko is the only engine that supports `background-clip: text` on the background shorthand as of now). This would be a bit unfortunate, but _probably_ ok?
 * Rename the `text` system color to something else, to prevent the naming conflict.
 * Something else I may be missing?

cc @melanierichards @dbaron 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4465 using your GitHub account
Received on Tuesday, 29 October 2019 09:53:49 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:55 UTC