- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 2 Aug 2011 11:01:00 -0700
- To: Markus Bruch <macinfo@arcor.de>
- Cc: www-style@w3.org
On Sun, Jul 31, 2011 at 4:34 AM, Markus Bruch <macinfo@arcor.de> wrote: > I would suggest that for a specific set of 16 grayscale shades, > to reduce the rgb-values to one single character: > > .gray { color: #ccc; } > > to: > > .gray { color: #c; } While I'm not necessarily opposed to something like this, I question the utility of saving two characters on a mere 16 colors. I think the 3-digit hex is very readable and trivial to type. I am strongly opposed to a 2-digit variant, because it has a different expansion rule than the 3-digit hex that already exists. If we wanted to make it easier to write grays, I'd be more in favor of a gray(<number> | <percentage>) function. However, it's relatively easy to use the hsl() function to create grays already, with "hsl(0,0%,<gray percentage>)". 50% gray is just hsl(0,0%,50%), which is slightly more verbose than gray(50%), but much better than rgb(50%,50%,50%). ~TJ
Received on Tuesday, 2 August 2011 18:01:47 UTC