The 'only' keyword has been re-added to the specification for color-scheme as a way of per-element opt-out of color-scheme override like forced darkening. div { color-scheme: light } will force the div element into color-scheme dark and apply forced darkening. div { color-scheme: only light } will keep the color-scheme for the element light and opt-out of forced darkening.

Motivation

This feature can be used to do per element opt-out of color-scheme overrides like forced darkening.

Specification

Specification link


Specification currently under development in a Working Group

Status in Chromium

Blink>CSS


Enabled by default (tracking bug)

Consensus & Standardization

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

  • In development
  • Shipped/Shipping
  • No signals

Owner

Comments

This feature is enabled as part of an original trial in M96: https://chromestatus.com/features/5672533924773888

Last updated on 2021-12-01