W3C home > Mailing lists > Public > www-style@w3.org > April 2012

[css4-color] Grayscale shorthand (with alpha)

From: Rudolph Gottesheim <r.gottesheim@loot.at>
Date: Tue, 17 Apr 2012 11:01:17 +0200
Message-ID: <4F8D315D.6010902@loot.at>
To: www-style@w3.org
I find myself writing things like rgba(0, 0, 0, .5) or rgba(192, 192, 
192, .8) dozens of times a day, mostly for shadows. It's always some 
shade of gray with some alpha value.

Do you think there's room for a grayscale color shorthand?

Maybe something like *gray(255, .5)* == rgba(255, 255, 255, .5) or 
*la(50%, .9)* == hsla(0, 0%, 50%, .9)

It probably seems like the few saved characters aren't worth a new 
function or syntax, but it just seems so redundant every time I type 
this stuff out. rgba(255, 255, 255, .2) ... ugh.

What do you think?

--
Rudolph Gottesheim
Received on Tuesday, 17 April 2012 09:01:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT