Re: [css-color] Starting CSS Color 4

On Thu, Apr 4, 2013 at 1:33 PM, L. David Baron <dbaron@dbaron.org> wrote:
> On Wednesday 2013-04-03 14:47 -0700, Tab Atkins Jr. wrote:
>> I just drafted up a CSS Color 4 draft.  It's only a few changes from level 3:
>>
>> * rgb() and rgba() functions now accept <number> rather than <integer>.
>> * hsl() and hsla() functions now accept <angle> as well as <number> for hues.
>> * All uses of <alpha-value> now accept <percentage> as well as <number>.
>> * 4 and 8-digit hex colors have been added, to specify transparency.
>
> So syntax expansions have a cost in compatibility and confusion:
> when authors don't realize which is the newer syntax and which is
> the older syntax, they'll inadvertently create content that doesn't
> work in older browsers, and potentially spend time debugging that.
> Language syntaxes don't, in general, allow any syntax that an author
> might think of.
>
> If the initial syntax draft had allowed multiple options I think
> that would have been different, but I'm really not convinced that
> it's worth the churn of expanding the syntax, even if these options
> might have been better choices if we were starting over.

At minimum, I think the rgb() <integer>-to-<number> switchover and
4/8-digit hex colors are necessary syntax additions.  The former fixes
a common authoring error when using JS (which I've done myself almost
every time I mess around with colors in <canvas>), while the latter is
a long-standing author request.

The other two are indeed just syntax niceties (the way those syntaxes
*should* have been written originally, imo), which I'd be okay with
dropping, but I'd still like to keep them. ^_^

~TJ

Received on Monday, 8 April 2013 16:44:59 UTC