CSS Color Adjust: Remove 'only' and support used 'dark' for preferred 'light' for color-scheme

The color-scheme property from CSS Color Adjustment level 1 spec changed in two ways. 1. The 'only' keyword is no longer special and is treated as a <custom-ident> as any other unknown color-scheme. The 'only' keyword was previously only allowed in combination with 'light', but had otherwise no effect in Chrome. 2. 'color-scheme: dark' will have a used value of 'dark' even when preferred color-scheme is 'light'. 'color-scheme: light dark' still has a used values based on the preferred scheme.

Motivation

The spec has changed which allows page author to use dark themed UA rendering even when the preferred color-scheme is 'light'. The new behavior is: color-scheme: light -> always light color-scheme: dark -> always dark color-scheme: light dark -> select the preferred scheme This means content which always have a dark theme in their CSS will be able to match that with dark themed UA controls. It also improves interoperability with WebKit which already had this behavior for 'color-scheme: dark'.

Specification

Editor's draft

Status in Chromium

Blink>CSS


Enabled by default (tracking bug) in:

  • Chrome for desktop release 85
  • Chrome for Android release 85
  • Android WebView release 85

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • Shipped/Shipping
  • No signals

Owner

Comments

CSSWG resolution: https://github.com/w3c/csswg-drafts/issues/3881#issuecomment-634799613

Last updated on 2020-10-25