← Back to release summary

Media Queries: prefers-color-scheme feature

Category
CSS
Type
New or changed feature
Status
Enabled by default (Chrome 76)
Intent stage
Prepare to ship

WPT details: https://wpt.fyi/results/css/mediaqueries/prefers-color-scheme.html?label=master&product=chrome%5Bexperimental%5D&product=edge&product=firefox%5Bexperimental%5D&product=safari%5Bexperimental%5D&aligned

Summary

Adds the 'prefers-color-scheme' feature, which lets authors adapt web content to user-selected dark theme in the OS or browser. Valid options are 'light', 'dark', or 'no-preference'.

Standards & signals

Ecosystem

Samples: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme#Examples

View on chromestatus.com