RE: [css3-animations] Times are listed as unitless

I also brought this up [1] and it seems Gradients assume zero angles
require a unit.

Given the precedent, I agree it would be more author-friendly if zero 
was allowed to have no unit everywhere. But even as someone who doesn't
write CSS parsers for a living, I am not sure the convenience is worth
the bug-prone ambiguity or more complex value syntax that can result. On
balance, making length the exception - on historical grounds and because
it is the most-used value type - does not seem unreasonable. But it does 
feel icky.

[1] http://lists.w3.org/Archives/Public/www-style/2010Oct/0551.html

> -----Original Message-----
> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf
> Of Eric A. Meyer
> Sent: Sunday, May 01, 2011 8:29 PM
> To: www-style@w3.org
> Subject: Re: [css3-animations] Times are listed as unitless
> 
> At 17:21 -0400 5/1/11, Boris Zbarsky wrote:
> 
> >Where are these expectations coming from?
> >http://www.w3.org/TR/1998/REC-CSS2-19980512/syndata.html#q20 (CSS 2.0,
> >back in 1998) says that times can't be unitless.  Compare it to
> >http://www.w3.org/TR/1998/REC-CSS2-19980512/syndata.html#length-units
> >which says that 0 lengths can be unitless.
> >
> >Or is the expectation coming from the fact that most web authors never
> >used any times, only lengths, which don't have the same syntax, and now
> >they're starting to use times and being confused?
> 
>     Very much so, yes.  For well over a decade now the lesson (not from
> the WG or specs, but in the general community) has been "zero needs no
> unit".  Not "zero lengths need no unit", just that zero can always be
> unitless.  Now that other number-based value types are coming into use--
> almost nobody ever used time values in the past-- most authors will assume
> they can have unitless zeroes everywhere.
> And the allowance for 'rotate(0)' isn't going to do anything to clear up
> the confusion.
>     It's going to be an educational challenge, but there should enough to
> make the explanations fairly clear.  Thanks for the pointer to that thread,
> by the way.
> 
> --
> Eric A. Meyer (eric@meyerweb.com)     http://meyerweb.com/
> 

Received on Monday, 2 May 2011 19:20:59 UTC