Re: [csswg-drafts] [css-color-4] Spec doesn't specify whether implementation must honor <decimal> in rgb/rgba or if it can truncate to an <integer>

Since there are some errors in the WPT rgb tests for decimals (fixed in https://github.com/w3c/web-platform-tests/pull/8538), I didn't realize Firefox has also implemented decimal channel parsing. As a result, I decided to do a comparison of Edge and Firefox. While Edge truncates decimals, Firefox rounds them (so in Edge `221.5` goes to `221` whereas in Firefox it would go to `222`).

It seems important to clarify this issue. Rounding would likely be more "accurate" than truncating, since it would always create a value closer to what was originally intended when compared to truncating.

-- 
GitHub Notification of comment by csnardi
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1983#issuecomment-348721895 using your GitHub account

Received on Saturday, 2 December 2017 21:35:46 UTC