[csswg-drafts] Pull Request: [css-color-adjust-1] Rework color scheme stuff to reflect f2f resolutions

tabatkins has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== [css-color-adjust-1] Rework color scheme stuff to reflect f2f resolutions ==
Just posting this as a PR for review purposes for a few days; I'll merge it next week if there are no objections.

This PR applies the resolution from the recent F2F in #13377, making `(prefers-color-scheme)` reflect the effects of `<meta name=color-scheme>` and adding a (name TBD) `(ua-color-scheme)` MQ to actually reflect the user's preference. This makes `(prefers-color-scheme)` now consistent across top-level and embedded documents (previously, embedded documents used the embedding element's used color scheme instead of the user's preferred color scheme), and allows theme switchers a single source of control (tho the [`PreferenceManager` API](https://drafts.csswg.org/mediaqueries-5/#script-control-user-prefs) should generally be used instead).

It also finally applies the previous resolutions from #7493 and #7213, making all embedded documents use the embedding element's color scheme (also, usefully, matching existing browser behavior).

As part of this, I significantly rearranged and rewrote the color scheme portions of Color Adjust to use the new "page color scheme" and "element color scheme" concepts, and generally promote setting the page color scheme with `meta` rather than using the 'color-scheme' property. This is the main thing I'd like review on from anyone interested.

See https://github.com/w3c/csswg-drafts/pull/13857


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 29 April 2026 04:28:19 UTC