W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2016

Re: [csswg-drafts] [css-color] Unnecessary comma in color()

From: Brad Kemper via GitHub <sysbot+gh@w3.org>
Date: Tue, 12 Jul 2016 13:43:48 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-232051212-1468331027-sysbot+gh@w3.org>
One of the big criticisms of rgba() is that the 'a' part is in a 
different number format (0-1, vs. 0-255). If 'color()' with rgb and 
'a' parts is similarly inconsistent (0%-100%, vs. 0-1), then it isn't 
an improvement on that front. 

Commas are reasonable ways to separate groups of values in CSS. So are
 slashes, when commas won't do. I think having a distinctive separator
 on either side of the color components would be a good thing, and 
would improve readability. It would also mean we could allow the 
author to choose between 0-1 and 0%-100% for each of the r,g,b, and a 
components. That would be nice. Thus, the author could use all 0-1 for
 consistency with legacy alpha and between numbers, or use all 
percentages if they want. 

GitHub Notification of comment by bradkemper
Please view or discuss this issue at 
using your GitHub account
Received on Tuesday, 12 July 2016 13:43:56 UTC

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