[webkit-dev] Request for position on "Make system colors compute to themselves"

Kevin Babbitt kbabbitt at microsoft.com
Wed Jul 29 13:46:04 PDT 2020


Hi webkit-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: https://github.com/w3c/csswg-drafts/issues/3847

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

chromestatus.com entry: https://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,



Kevin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20200729/93e702f4/attachment.htm>


More information about the webkit-dev mailing list