Allows authors to provide separate colors for light and dark color-schemes on a per element basis. System colors and UA form controls are rendered with different colors depending on the color-scheme set on an element. Authors can have the same possibility through the light-dark() function: #target { background-color: light-dark(lime, green); } The #target element will have a green background if the used color-scheme for the element is 'dark'. Otherwise, the background will be lime.
None
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
Colors in the light-dark() function can be edited like it is currently possible for the color-mix() function. No changes needed.
Existing tests: https://wpt.fyi/results/css/css-color/light-dark-basic.html https://wpt.fyi/results/css/css-color/light-dark-currentcolor.html https://wpt.fyi/results/css/css-color/light-dark-inheritance.html To be added by Chromium implementation: https://wpt.fyi/results/css/css-color/light-dark-currentcolor-in-color.html (https://chromium-review.googlesource.com/c/chromium/src/+/5245470/5/third_party/blink/web_tests/external/wpt/css/css-color/light-dark-currentcolor-in-color.html)
Shipping on desktop | 123 |
Shipping on Android | 123 |
Shipping on WebView | 123 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None--
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+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACuPfeRdn47UWS8NzHSxokHbkEwkyXbqqceBJg50QSGh3Q4sQg%40mail.gmail.com.
LGTM2
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw8UVSF9e0BeJE1dVaksDHJ4QGniGa8rqEkn401JtYDDjg%40mail.gmail.com.
LGTM3
/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/3b0cb34e-386a-45a3-8842-df4ced99c5db%40chromium.org.