Contact emailsfuth...@chromium.org Specificationhttps://drafts.csswg.org/css-color-adjust/#color-scheme-prop
Summary 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. Previously, both declarations below would force the div element into color-scheme dark and apply forced darkening. With this change, the second declaration would opt-out of forced darkening and keep the used color-scheme 'light'. div { color-scheme: light } div { color-scheme: only light } will keep the color-scheme for the element light and opt-out of forced darkening. This feature is already enabled as part of an original trial in M96: https://chromestatus.com/features/5672533924773888 Blink componentBlink>CSS <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3ECSS> TAG reviewN/A Change to existing API already covered by CSS spec TAG review statusNot applicable Risks Interoperability and Compatibility Low risk: WebView has shipped forced darkening. This change means content loaded in WebViews may opt out of forced darkening with "color-scheme: only light;" where it previously would see 'only' as an unrecognized color-scheme and for 'light' into 'dark'. Low risk: Making 'only' a recognized keyword instead of a color-scheme means the parser will no longer accept multiple instances of 'only' in the same declaration, so declarations like this will be dropped: div { color-scheme: only only dark } WebKit already recognized 'only' as an opt-out of forced darkening keyword. Gecko: In development (https://bugzilla.mozilla.org/show_bug.cgi?id=1576289) Development of the color-scheme property in progress. At least blocker issues are being fixed. WebKit: Shipped/Shipping Web developers: No signals Debuggability The existing property and the new keyword should automatically be supported in devtools. There is possibly a need for force dark / color-scheme override debugging support in devtools, but that is out of scope for this minor change. Is this feature fully tested by web-platform-tests <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md> ?Yes Changes made to tests under https://wpt.fyi/results/css/css-color-adjust/parsing to account for spec changes for 'only'. Web platform tests do not support running with color-scheme overrides. A couple of Blink-specific rendering tests have been added to run under virtual/dark-mode-* Flag nameCSSColorSchemeOnly (Blink runtime flag) Requires code in //chrome?False Tracking bughttps://crbug.com/1224806 Estimated milestones DevTrial on desktop 96 DevTrial on android 96 DevTrial on Webview 96 Link to entry on the Chrome Platform Status https://chromestatus.com/feature/5157621012103168 This intent message was generated by Chrome Platform Status <https://www.chromestatus.com/>. -- Rune Lillesveen -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscr...@chromium.org. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACuPfeRTvY%3DTtDB_S41JApSPhEOGgTc%2BFPZKBVUAQFGPsTLR9A%40mail.gmail.com.