Contact emails
alm...@microsoft.com,
ra...@microsoft.com
Explainer
N/A
Spec
https://drafts.csswg.org/css-color-4/#css-system-colors
Summary
Support for the new system color keywords, ActiveText, Field, and FieldText, from CSS Color Module Level 4. These keywords are currently implemented behind a runtime flag called NewSystemColors.
ActiveText is the a new system color keyword for active links. On Windows, ActiveText will map to the Windows Hotlight color, similar to LinkText and VisitedText. Otherwise, ActiveText will map to the default active link color - rgb(255, 0, 0).
Field is the new system color keyword for input field backgrounds. On Windows, Field maps to the Window system color. On Mac, Field maps to the ControlBackground system color. Otherwise, Field will map to rgb(0, 0, 0) in dark mode and rgb(255, 255, 255) in light mode.
FieldText is the new system color keyword for input field text. On Windows, FieldText maps to the WindowText system color. On Mac, FieldText maps to the Text system color. Otherwise, Field will map to rgb(255, 255, 255) in dark mode and rgb(0, 0, 0) in light mode.
Link to “Intent to Implement” blink-dev discussion
N/A
TAG Review
ActiveText, Field, and FieldText are new system color keywords added to the existing set of keywords, so a TAG review is not needed.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes, the keywords themselves will be supported on all platforms, but they will only evaluate to associated system colors on Windows and Mac.
Risks
Interoperability and Compatibility
Firefox: Under development
Edge: Strong support
Safari: No public signals - bug filed
Web developers: No public signals
Ergonomics
ActiveText, Field, and FieldText are the final set of new keywords added to the existing set of system color keywords.
Security
System color keywords can be used for fingerprinting as they can be used to expose a user preference. However, ActiveText, Field, and FieldText do not add any additional security threats to the already existing set of exposed system color keywords.
(https://drafts.csswg.org/css-color-4/#priv-sec)
Demo
Sample CSS:
a {
color: ActiveText;
}
input {
background-color: Field;
color: FieldText;
}
Is this feature fully tested by web-platform-tests?
Web-platform tests for the parsing and serialization of ActiveText, Field, and FieldText have been added (https://github.com/web-platform-tests/wpt/pull/19856).
Since system colors are platform dependent, web-platform tests for the calculation of system colors were not added. Instead, the calculation of ActiveText, Field, and FieldText are tested, along with the other system color keywords, in internal Chromium web tests and browser tests.
Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1015968
Entry on the feature dashboard
https://www.chromestatus.com/feature/4892451430989824
Related CL
https://chromium-review.googlesource.com/c/chromium/src/+/1872774
--
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/SN6PR00MB0415E373A128A472496B5F708A4F0%40SN6PR00MB0415.namprd00.prod.outlook.com.
LGTM2
/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw-o6w8Bua4xcsPrJezV12utbP3M%3Dwh5Syo8ibtAQ9cWKA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/e7a42f8e-54ba-a76b-efdd-3949b99f5753%40gmail.com.