Contact emails
Explainer
n/a
Spec
https://drafts.csswg.org/css-color/#funcdef-rgb
Summary
According to CSS Color 3, only integer values or percentages were valid inside the RGB or RGBA functions. However, with CSS Color 4, the specification notes that "the CSS syntax allows full <number>s, not just <integer>s, for authoring convenience". This change would make it so that floating point and decimal values are parsed as valid inside of the RGB or RGBA functions. However, the proposed change would not result in any behavioral change, as the values would be still truncated to integers for painting/etc.
Draft CL: https://chromium-review.googlesource.com/c/chromium/src/+/719775
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes, this would be a universal feature.
Debuggability
DevTools does not currently parse floating point RGB values in the color picker, but this can easily be updated.
Risks
Interoperability and Compatibility
Edge: Shipped with consistent behavior as to what is proposed (see e.g. https://jsfiddle.net/0v82oe3r/ in Edge)
Firefox: No signals
Safari: No signals
Web developers: No signals
Ergonomics
n/a
Activation
n/a
Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.
No web platform tests have been created; I'm not sure if this is necessary or if existing LayoutTests are sufficient.
Entry on the feature dashboard
Small change, shouldn't result in any user-facing behavior changes
Requesting approval to ship?
Yes
On Wed, Oct 25, 2017 at 4:44 AM, <csna...@gmail.com> wrote:
> https://drafts.csswg.org/css-color/#funcdef-rgb
It doesn't seem to detail whether to use floor() or round()? Your
email suggests floor(), but the spec doesn't say as far as I can tell.
It also doesn't say what the computed value in the object model would
be.
> Edge: Shipped with consistent behavior as to what is proposed (see e.g.
> https://jsfiddle.net/0v82oe3r/ in Edge)
That doesn't really give answers to all the questions this addition raises.
> No web platform tests have been created; I'm not sure if this is necessary
> or if existing LayoutTests are sufficient.
Seems like that would be good to help determine how exactly it should
behave and ensure everyone ends up implementing that.
--
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+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/aa0ec354-1301-478d-a001-6ed2f1583316%40chromium.org.
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/aa0ec354-1301-478d-a001-6ed2f1583316%40chromium.org.
--
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/CAOMQ%2Bw8xmO_5Qzzk3Zg%2Bt4RVxTgvYY88F5Cj_cEm7htR6wz4TQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADnb78j-32Et5xmfwfQeL82wTv%2BPQa4rTEs2px10%2BoVhPi7uyA%40mail.gmail.com.
I was planning on waiting to see if there was any consensus from this list/the spec bug in order to determine future direction for this. However, if I remember correctly, we also need to make it so that commas are optional in rgb/rgba in order for those tests to pass.
Implementations should honor the precision of the channel as authored or calculated wherever possible. If this is not possible, the channel should be rounded to the closest value at the highest precision used, rounding up if two values are equally close.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/op.zcxus4f4rbppqq%40cicero2.linkoping.osa.