W3C home > Mailing lists > Public > www-style@w3.org > November 2009

Re: unitless angles (and times and frequencies) [css3-2d-transforms][css3-3d-transforms][css3-images]

From: Simon Fraser <smfr@me.com>
Date: Wed, 04 Nov 2009 14:50:58 -0800
Cc: www-style@w3.org
Message-id: <04B13779-8338-4289-8E39-F458C19D00BB@me.com>
To: "L. David Baron" <dbaron@dbaron.org>
On Nov 4, 2009, at 10:18 AM, L. David Baron wrote:

> Both CSS 2.0 and css3-values are clear that '0' (without units) is
> acceptable as a <length>, but not as an <angle>, <frequency>, or
> <time>.
>
> It turns out that:
>
> * unambiguous parsing of the new gradient syntax proposal depends
>   on this (in particular, that '0' is not an angle)
>
> * css3-2d-transforms has a number of examples of using '0' as an
>   angle, e.g., 'rotate(0)'
>
> I think 'rotate(0)' is currently implemented in Mozilla, and I'm
> guessing that, given the examples in the transforms spec, it's also
> implemented in WebKit.
>
>
> We either need to:
> * decide that CSS 2.0 and css3-values are correct, change the
>   transforms examples, and possibly break some existing uses of
>   transforms,
> * make a special exception for angles in transform functions, or
> * fix the gradients spec in some way.
>
> My current inclination may actually be to make an exception for
> transform functions.

Unitless 0 for angles in transforms is very common. I'd prefer we don't
break that.

I'm close to proposing a slightly modified syntax for gradients, but I  
fear
it will have the same ambiguity about a parameter being a length vs.
an angle if unitless.

Simon
Received on Wednesday, 4 November 2009 22:52:05 GMT

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