W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: [css4-color] #RGBA

From: Patrick Garies <w3c.www-style@patrick.garies.name>
Date: Thu, 09 Sep 2010 23:21:47 -0500
Message-ID: <4C89B25B.8060607@patrick.garies.name>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: mollyh@opera.com, Brian Manthos <brianman@microsoft.com>, Christoph P├Ąper <christoph.paeper@crissov.de>, "www-style@w3.org list" <www-style@w3.org>
  On 2010-09-09 10:16 PM, Tab Atkins Jr. wrote:
>  If you're using an all-gray palette, I don't think it's very taxing
>  to say hsl(0,0%,<gray%>). Not as terse as possible, but pretty
>  good.

It's not really a big deal when you're doing it once. When you have a 
bunch of color rules, it starts getting messy as well as annoying to 
type though. And I can't eliminate the spaces without violating personal 
convention; I try to maintain a consistent coding style.

This isn't an absolute must-have, of course, but since there's already 
brainstorming for CSS4 Color...

>  If we were to specifically address the use-case of "make creating
>  gray colors as terse as possible", I'd just create a gray() function
>  that took a percentage. That's much clearer than some
>  single-argument version of rgb() or hsl().

As far as clarity goes, I think that's a better idea. Given the CSS3 
Color convention of allowing both use of "gray" and "grey" in keywords 
though, you'd also need |grey()| for consistency.
Received on Friday, 10 September 2010 04:22:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC