W3C home > Mailing lists > Public > www-style@w3.org > May 2011

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

From: David Singer <singer@apple.com>
Date: Fri, 06 May 2011 10:26:28 -0700
Cc: Sylvain Galineau <sylvaing@microsoft.com>, Simon Fraser <smfr@me.com>, "Eric A. Meyer" <eric@meyerweb.com>, "www-style@w3.org" <www-style@w3.org>
Message-id: <9EB4F261-BA3A-42E1-8523-7C5EC68D93A1@apple.com>
To: Dean Jackson <dino@apple.com>

On May 5, 2011, at 16:50 , Dean Jackson wrote:

> 
> On 03/05/2011, at 8:42 AM, Sylvain Galineau wrote:
> 
>> 
>> [Simon Fraser:]
>>> On May 2, 2011, at 12:17 PM, Sylvain Galineau wrote:
>>> 
>>>> 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.
>>> 
>>> I'm strongly in favor of unitless zero everywhere. As an author, I
>>> wouldn't be able to remember where I need units and where I do not if the
>>> rules differ for different values.
>> 
>> Same everywhere is ideal. Or a single exception such as "not required for 
>> lengths but needed everywhere else". I'd be OK with either. Any more 
>> complicated is a fail imo.
> 
> Count me in with Simon and Eric. The majority of CSS developers are going to expect 0 means 0 everywhere, and that you don't need to worry about units.


>From a metrics point of view, I have a hard time thinking of a case where 0<unit> means something different from 0 (with the units implied). From an authoring point of view, I agree that most would expect 0 to be clear as meaning, well, none of whatever is expected here.


However, are we sure that there are no cases in the grammar where you understand something was left out, or not, based on its data type?  That is, say you have

something optional-angle optional-length 

and the default values are not zero.  then
something 0
could be setting the angle to zero and leaving the length at default, or vice versa.  

Are we sure that there are no parsing-depends-on-units-implying-type places in CSS?


David Singer
Multimedia and Software Standards, Apple Inc.
Received on Friday, 6 May 2011 17:26:56 GMT

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