- From: CSS Meeting Bot via GitHub <noreply@w3.org>
- Date: Wed, 18 Mar 2026 17:00:51 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[mediaqueries-5] How does script control of preferences work with forced color schemes?`, and agreed to the following: * `RESOLVED: Script preferences and user preferences have identical expressivity. Order of priority (least to most) is: OS, UA, user, site, forced overrides (forced-colors mode or other forced automatic color conversions)` * `RESOLVED: Script preferences and user preferences have identical expressivity. Order of priority (least to most) is: OS, UA, user, preferences API, forced overrides (forced-colors mode or other forced automatic color conversions)` <details><summary>The full IRC log of that discussion</summary> <florian> s/people will/people writing HTML attributes will/<br> <JoshT> lwarlow: to summarise, CSS media queries 5 has API for a website to control the value that's used for various user pref queries<br> <JoshT> ... e.g. colour scheme, reduced motion, etc<br> <JoshT> ... one weird thing is if you have your website set with the color scheme of 'light dark' dark and then set a pref for light mode...<br> <JoshT> ... if your browser does auto dark mode, auto dark mode will win<br> <TabAtkins> q+<br> <JoshT> ... i think that behaviour is wrong<br> <JoshT> ... this would effecively mean 'light only'<br> <JoshT> ... this is not new behaviour so we're not ignoring the user agent<br> <JoshT> ... so I think this should be interpretted as 'light only'<br> <Rossen> ack TabAtkins<br> <JoshT> TabAtkins: agreed. think the layering we want is that this sets the last word on what the pref is<br> <JoshT> ... on purpose so you can use a site based theme picker and have it win over whatever you do on your OS for other reasons<br> <JoshT> +1<br> <JoshT> ... if script sets light or dark, that is what the page should act on in all cases<br> <bramus> +1<br> <davidjmarland> q+<br> <Rossen> ack davidjmarland<br> <JoshT> davidjmarland: confirming, so if a script sets the preference... that means if the user actions the script right?<br> <JoshT> TabAtkins: this API lets the page set what the user preference is<br> <JoshT> ... in theory, you could do whatever. in theory, you could also ignore the user preference<br> <JoshT> davidjmarland: so sites can already ignore this anyway?<br> <JoshT> lwarlow: if anyone thinks we should have user activation of the API, we should open a separate issue for that<br> <TabAtkins> (we have raised the user-activation issue already, and decided against it, for the exact reason of "you can just ignore the MQ anyway")<br> <JoshT> fantasai: I'm always confused by light only and dark only<br> <alisonmaher> q+<br> <JoshT> TabAtkins: the only keyword is actually not relevant to this. this is actually about what gets the final say<br> <JoshT> davidjmarland: I was thinking of the scenario if something sets dark mode higher up and the website could disable it<br> <Rossen> ack alisonmaher<br> <JoshT> alisonmaher: how does this interact with forced colours mode?<br> <JoshT> TabAtkins: yes, forced colour schemes are at a different level and just ignore everything in your styles<br> <JoshT> fantasai: don't they tweak the media query to match accordingly<br> <JoshT> lwarlow: yes it can override the media query. expectation is that would win in this case<br> <florian> q?<br> <JoshT> ... this issue is around a separate thing: the forced colour schemes<br> <JoshT> ... I don't know if it's actually shipped in any browsers<br> <JoshT> ... but chrome has a feature to make up a dark mode theme on pages that don't have dark mode<br> <fantasai> So I think what we're trying to say is that the script preferences can express the same things as the user preferences, and the priority order is (least to most): OS, UA, user, site, forced-colors<br> <JoshT> florian: but if it wins over the media query and ...<br> <lwarlow> Yes<br> <JoshT> fantasai: we're just saying script preferences express the same as the user preference<br> <lwarlow> forced colors will always win<br> <JoshT> ... and least to most priority is ???<br> <fantasai> PROPOSED: Script preferences and user preferences have identical expressivity. Order of priority (least to most) is: OS, UA, user, site, forced-colors override<br> <JoshT> Rossen: are we doing the original proposal?<br> <JoshT> TabAtkins: the forced colour scheme stuff and auto dark mode adjustments that chromium has behind a flag...<br> <JoshT> ... the actual forced colours wins over colour scheme preferences<br> <florian> s/but if it wins over the media query and .../Forced colors doesn't only win over MQ, it also changes what the MQ is, we don't want to hide that so that people can respond<br> <JoshT> ... auto dark mode is a global page thing. that should lose to the script setting in terms of prefers-color-scheme MQ<br> <JoshT> Rossen: what you said still resonates with fantasai's proposal<br> <fantasai> PROPOSED: Script preferences and user preferences have identical expressivity. Order of priority (least to most) is: OS, UA, user, site, forced overrides (forced-colors mode or other forced automatic color conversions)<br> <bramus> +1<br> <lwarlow> +1<br> <davidjmarland> +1<br> <fantasai> RESOLVED: Script preferences and user preferences have identical expressivity. Order of priority (least to most) is: OS, UA, user, site, forced overrides (forced-colors mode or other forced automatic color conversions)<br> <JoshT> RESOLVED: Script preferences and user preferences have identical expressivity. Order of priority (least to most) is: OS, UA, user, preferences API, forced overrides (forced-colors mode or other forced automatic color conversions)<br> <lwarlow> HD resolution<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11575#issuecomment-4084115241 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 18 March 2026 17:00:52 UTC