W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

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>

From: csnardi via GitHub <sysbot+gh@w3.org>
Date: Sat, 02 Dec 2017 21:35:41 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-348721895-1512250540-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:21 UTC