Re: [css21][css3][svg] SVG and unit-less length values

On 7/7/10 7:03 AM, Sylvain Galineau wrote:
> This means the validity of a length property value depends on the property and/or the type of node it applies to.

It does not depend on the type of node it applies to, in fact.

> [3] http://www.w3.org/TR/SVG/types.html#DataTypeLength

As the text at this link clearly says:

   For properties defined in CSS2 [CSS2], a length unit identifier
   must be provided. For length values in SVG-specific properties
   and their corresponding presentation attributes, the length unit
   identifier is optional.

Now this leaves a loophole the size of a truck for properties not in 
CSS2 but presend in CSS2.1 or CSS3...  But that's pretty easy to fix.

In any case, it doesn't seem like changes are needed here for 
line-height, for example.  Though note the recent discussion about how 
this stuff is supposed to interact with SMIL type="CSS" animations on 
www-svg.

 > The CSSWG must of course keep this in mind when defining new
 > properties that are intended to apply to SVG documents.

Only insofar as we need to avoid name collisions with existing 
properties that the SVG specification defines and which it therefore 
requires to have the unitless length behavior, no?

-Boris

Received on Wednesday, 7 July 2010 14:48:59 UTC