Contact emails
Chris Nardi (csna...@gmail.com)
Summary
CSS Color 4 introduces a new syntax for RGB{A}, which separates the color channels with whitespace, and separates the alpha value with a backslash. CSS Color 4 also makes RGB and RGBA synonyms of each other, making it so that the alpha value is an optional parameter in each. Additionally, the alpha parameter is expanded to include percentages as well. The legacy RGB{A} syntax with commas is preserved, but as RGB and RGBA are now synonyms, each function allows an optional alpha value.
This would not implement decimal parsing of color channels, as that is discussed in https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/zH51Atd-Vag and blocked on spec clarification.
Design Doc/Spec
https://drafts.csswg.org/css-color/#numeric-rgb
Motivation
While this wouldn't necessarily significantly improve the web developer experience, it does make it easier as the functions are now interchangeable, no commas are required, and percentages would no longer need to be converted to a decimal for the alpha value.
Risks
Interoperability and Compatibility
There should be no compatibility risk, as the legacy syntax is still supported. No functional changes would occur to already valid code; the only change would be that previously invalid code would now be parsed.
Edge: No signals
Firefox: Shipped (WPT tests with new syntax pass)
Safari: No signals
Web developers: Unclear
Ergonomics
n/a
Activation
The changes would be easy for web developers to use.
Debuggability
This shouldn't require any changes to DevTools.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Is this feature fully tested by web-platform-tests?
Yes, https://wpt.fyi/css/css-color contains tests covering the new syntax.
Link to entry on the feature dashboard
A feature dashboard entry would probably be appropriate, as this does add new syntax for web developers (I don't have permission to do this, however).
Requesting approval to ship?
Yes, although a CL is not finalized for this change yet.
--
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/CAARdPYdRpQaH_3fxv%3DeXvY7KZjjARUDvh%2B4A4CpJ61pT%3DeiwjA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/op.zap8aueerbppqq%40cicero2.linkoping.osa.