Request for position on "Make system colors compute to themselves"

# Kevin Babbitt (18 hours ago)

dev,

I'm working on implementing the change described in CSSWG issue 3847 "Make system color keywords compute to themselves" in Blink and wanted to request a position statement from WebKit on this behavioral change.

Discussion: w3c/csswg-drafts#3847

Spec: drafts.csswg.org/css-color-4/#resolving-color-values

chromestatus.com entry: www.chromestatus.com/feature/5728029949034496

This is newly specified behavior for an existing web platform feature. Presently, the computed value of a CSS system color keyword can be the rgb value that the keyword maps to. However, this causes problems when a color keyword is inherited across elements with differing values for the color-scheme property.

For example, suppose we have an element with "color-scheme: light; color: MenuText". At computed-value time, the MenuText keyword will be mapped to an rgb value using the light color scheme. If that element has a child with "color-scheme: dark" and no specified value for "color", it will inherit the rgb value, which will not match the desired dark color-scheme on the child.

Instead, the parent element's computed value for color should be MenuText. The child will inherit the keyword, and at resolved-value time, the keyword is mapped to the rgb value using the dark color scheme.

Please let me know your thoughts and thanks for your consideration,

Contact us to advertise here

Want more features?

Request early access to our private beta of readable email premium.