W3C home > Mailing lists > Public > www-svg@w3.org > May 2010

Re: Unitless lengths in SVG and CSS

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 26 May 2010 22:57:12 -0400
Message-ID: <4BFDDF88.6060508@mit.edu>
To: Michael Day <mikeday@yeslogic.com>
CC: www-svg@w3.org
On 5/26/10 9:31 PM, Michael Day wrote:
>> [1]
>> http://dev.w3.org/SVG/profiles/1.1F2/publish/types.html#DataTypeLength
>
> In this spec length is defined like this in style sheets:
>
> length ::= number (~"em" | ~"ex" | ~"px" | ~"in" | ~"cm" | ~"mm" | ~"pt"
> | ~"pc")?
>
> What are the ~ characters for, and why is the unit still optional?

No idea on the former.  On the latter, presumably because the _grammar_ 
allows not having a unit, since the requirement to have it is a 
per-property restriction in this spec.  Arguably it would be better to 
have a separate CSSlength unit if this approach is taken.

-Boris
Received on Thursday, 27 May 2010 02:57:49 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:45 GMT