← Back to release summary

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

Category
CSS
Type
New or changed feature
Status
Enabled by default (Chrome 85)
Intent stage
Evaluate readiness to ship

Summary

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'.

Standards & signals

View on chromestatus.com