Re: Unitless lengths in SVG and CSS

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 UTC