Re: Unitless lengths in SVG and CSS

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,

Michael

-- 
Print XML with Prince!
http://www.princexml.com

Received on Thursday, 27 May 2010 01:32:04 UTC