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

Re: Unitless lengths in SVG and CSS

From: Michael Day <mikeday@yeslogic.com>
Date: Thu, 27 May 2010 11:31:25 +1000
Message-ID: <4BFDCB6D.3080609@yeslogic.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: www-svg@w3.org
Hi Boris,

> Note that in practice what UAs do is to parse things like @font-size 
> without a required unit but to require the unit in actual CSS (inline 
> style, linked stylesheets, etc).  I seem to recall there was some draft 
> of some svg spec that mentioned this behavior, but can't find it at the 
> moment.

That would be great, and is consistent with the way that numbers must 
conform to CSS when used in style sheets and the style attribute and can 
only include exponential notation when used in SVG attributes.

> [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?

Best regards,


Print XML with Prince!
Received on Thursday, 27 May 2010 01:32:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:21 UTC