W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2020

[csswg-drafts] [css-color-5] Interpolation of system color keywords (#5780)

From: Kevin Babbitt via GitHub <sysbot+gh@w3.org>
Date: Thu, 10 Dec 2020 23:46:03 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-761719355-1607643962-sysbot+gh@w3.org>
kbabbitt has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-5] Interpolation of system color keywords ==
#3847 resolved that system color keywords should compute to themselves. There was a question left open regarding interpolation. There have been fragments of further discussion around this, but I haven't seen a formalized resolution, so I wanted to raise it as its own issue.

https://github.com/w3c/csswg-drafts/issues/3847#issuecomment-548097809 suggested that system colors should be treated the same as currentcolor: convert to a used value and interpolate based on that, per https://drafts.csswg.org/css-color-5/#interpolation:
> Interpolating to or from currentcolor is possible. The numerical value used for this purpose is the used value.

https://github.com/w3c/csswg-drafts/issues/5392#issue-672967371 suggested using color-mix() to interpolate between system color keywords. For example, if we're running an interpolation between the system color keywords `canvas` and `menu`, and the timing function just returned a value of 0.4, the interpolated value would be `color-mix(canvas 40%, menu)`.

Though the color-mix() suggestion was mine, I'm not particularly attached to it. The "resolve to used value" behavior seems less likely to introduce compat issues, and after implementing #3847 in Blink behind a flag, I discovered that it already had the "resolve to used value" behavior.

Either way, I'm hoping we can get the desired behavior covered in the spec. What does the working group think?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5780 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 10 December 2020 23:46:04 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:23 UTC