- From: ananya ky via GitHub <noreply@w3.org>
- Date: Thu, 12 Feb 2026 12:05:56 +0000
- To: public-css-archive@w3.org
ananya-ky has just created a new issue for https://github.com/w3c/csswg-drafts: == Opt-out mechanism from auto dark/forced dark for dark-by-design pages in `<meta name="color-scheme">` == I have been reading through the recent issues around `<meta name="color-scheme">` and the `only` keyword ([#5089](https://github.com/w3c/csswgdrafts/issues/5089#issuecomment-844525850), [#10249](https://github.com/w3c/csswg-drafts/issues/10249), [#3881](https://github.com/w3c/csswg-drafts/issues/3881)) and I had a couple of questions. As I understand it, the possible values for the `content` attribute of the `<meta>` tag are- - `light` - Document supports light; UA may still apply transformations (like forced dark) - `dark` - Document supports dark; UA may still apply transformations. - `light dark`/`dark light` - Document supports both; UA may choose based on the order, and user preference. - `only light`- Document supports only light mode; no auto-darkening or forced dark mode will be applied. However, `only dark` is valid in the `color-scheme` CSS property, but not valid in the `<meta>` tag as per MDN (see link below). 1. **Is it truly the case as stated by MDN that [`only dark` is invalid because it could force a document to render in a mode for which it is not designed](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meta/name/color-scheme#:~:text=only%20dark%20is%20invalid%2C%20because%20forcing%20a%20document%20to%20render%20in%20dark%20mode%20when%20it%20isn%27t%20compatible%20can%20result%20in%20unreadable%20content%20and%20all%20major%20browsers%20default%20to%20light%20mode%20if%20not%20otherwise%20configured.)?** Since the author of the document requested `only dark`, can't we assume that they understand whether their document is compatible with dark mode? The [Color Adjustment spec](https://drafts.csswg.org/css-color-adjust/#color-scheme-prop:~:text=2.3.%20Overriding%20the%20Color%20Scheme) does not explicitly say `only dark` is invalid. Is it the case that the spec and [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meta/name/color-scheme#:~:text=only%20dark%20is%20invalid%2C%20because%20forcing%20a%20document%20to%20render%20in%20dark%20mode%20when%20it%20isn%27t%20compatible%20can%20result%20in%20unreadable%20content%20and%20all%20major%20browsers%20default%20to%20light%20mode%20if%20not%20otherwise%20configured.) disagree on the validity of `only dark`? 2. **How can we tell the UA to not apply transformations like auto darkening/forced darkening for a page that is dark by design?** The reason I ask this is because there are situations where color reproduction remains critical. A page that looks dark may still want to ensure that the UA doesn't modify the colours. - It seems counter-intuitive to ask authors of a page that looks dark to use `only light` to indicate this.. In terms of UX, the user may need to activate 'light' mode to get the page to look _dark_ in the way they expect. - We understand that there are likely few pages that are designed exclusively for dark mode (and that would require UA to render widgets in dark mode - something not all UAs are capable of doing). In many cases, authors style these components themselves, rather than relying on UA-provided theming for the widgets. Was this the reason behind the decision not to support `only dark`, if it is indeed invalid? Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13486 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 12 February 2026 12:05:57 UTC