Re: Unitless lengths in SVG and CSS

On 5/26/10 2:48 AM, Michael Day wrote:
> In SVG 1.1, the font-size property can take unitless lengths, like "50".
> However, CSS has never supported a unitless number value for the
> font-size property, and such a declaration should be ignored.
>
> How should implementations resolve this dilemma?

SVG 1.1 second edition draft has this to say [1]:

   For properties defined in CSS2 [CSS2], a length unit identifier
   must be provided.

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.

-Boris

[1] http://dev.w3.org/SVG/profiles/1.1F2/publish/types.html#DataTypeLength

Received on Wednesday, 26 May 2010 15:54:31 UTC