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

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

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Sun, 10 Jul 2016 07:13:34 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-231574687-1468134812-sysbot+gh@w3.org>
1. Given that color spaces can have any number of arguments, I think 
it's an important distinction for readability whether `color(foo .1 .2
 .3 .5) is a color with 3 params that is 50% opaque or a fully opaque 
color with 4 params.
2. One of the tenets of good usability is the robustness principle: 
"be conservative in what you do and liberal in what you accept from 
others". Since there is no ambiguity, I think both percentages and 
floats should be allowed as alpha values. Especially since existing 
color functions accept floats, so not allowing them in `color()` is 
bound to create a ton of confusion.
3. :+1:, in fact I believe this is one of the resolutions in the SF 
4. :+1:
5. See 2.

I'm also not sure about dropping the comma between the color space and
 its params either. When things in CSS are space-separated, people 
expect to be able to use any order, unless there is an obvious 
ambiguity (e.g. all numbers). I think when there is a specified order,
 it's more clear to have a comma.

GitHub Notification of comment by LeaVerou
Please view or discuss this issue at 
using your GitHub account
Received on Sunday, 10 July 2016 07:13:41 UTC

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