-
Notifications
You must be signed in to change notification settings - Fork 746
Description
#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.
#3847 (comment) 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.
#5392 (comment) 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?