There are a couple of failures from the color-scheme WPT: https://wpt.fyi/results/css/css-color-adjust/parsing/color-scheme-computed.html?label=experimental&label=master&aligned, this is because WebKit implements an older spec. Latest spec (implemented by Chromium): https://drafts.csswg.org/css-color-adjust-1/#color-scheme-prop Here are differences from the spec that WebKit should implement: * `auto` keyword is now `normal` (and `auto` becomes a `<custom-ident>` value) * `only` keyword has been removed, and is just considered as a `<custom-ident>` value * `<custom-ident>` values should be kept in the serialized CSS value (not sure that's part of the spec, but the WPT seems to reflect that) Things where the WPT could be more flexible or wrong: * Ordering of the color-schemes * `only only` being serialized as it is? Since specifying a color-scheme multiple times is the same as specifying it once, maybe `only` is an acceptable serialization too?
<rdar://problem/76892358>
Created attachment 426549 [details] Patch
Created attachment 426784 [details] Patch
Created attachment 427012 [details] Patch
This needs work to make sure it does not regress Mail and the auto-dark mode transformations it does (specifically the rename of auto to normal, and handling only). I think it is a mistake to remove the internally handling of "only" in WebKit. I don't think us supporting it conflicts with the spec's wording of custom identifiers. We would just need to handle other custom identifiers for sterilization in addition to our handling of "only".
> This needs work to make sure it does not regress Mail and the auto-dark mode transformations it does (specifically the rename of auto to normal, and handling only). > I think it is a mistake to remove the internally handling of "only" in WebKit. I don't think us supporting it conflicts with the spec's wording of custom identifiers. We would just need to handle other custom identifiers for sterilization in addition to our handling of "only". Yeah, hence why I didn't land it yet. I was planning on either fixing Mail, or handling <custom-ident> properly in a separate bug.
*** Bug 225779 has been marked as a duplicate of this bug. ***
Update: I have a local WIP covering <custom-ident> too, though it seems like the spec might change again, so I'll wait for that to happen.
*** Bug 205799 has been marked as a duplicate of this bug. ***
Probably easier to do this in parts: 1. renaming `auto` to `normal` 2. support <custom-ident> and return schemes in specified order I'll split 1. to a different bug. (Also `only` was re-added to the spec)