Re: animate-elem-46-t.svg

On Sunday, June 6, 2010, 10:49:05 AM, Robert wrote:

RL> Hi,

RL> This test contains the following:

RL> <animate xlink:href="#textID_1" attributeName="font-size"
RL> values="30;12;30" dur="3s" fill="freeze"/>

RL> However font-size is should have units if it is defined by CSS 

That is not quite accurate.

'font-size' must have units if it is used in a CSS stylesheet (style attribute, style element, or external style sheet). This is to fit in with the CSS grammar rules, specifically to allow font-size to be used as part of the 'font' shorthand property.

'font-size' when used as a presentation attribute need not have units. Indeed it is commonly used without units; it then refers to the current local coordinate system, just like paths, etc do. Presentation attributes do not have the same parsing constraints that CSS stylesheets do. In particular, they contain a single property value without comments, and there are no presentation attributes for shorthand properties.

RL> and the
RL> default value for attributeType is "auto" which means use CSS if
RL> possible. 

Not quite accurate either.

'auto' is the default case because mostly, there is not an xml attribute and a CSS property with the same name and with different meanings. The other values, 'xm;' and 'css' are only needed in the case of a clash. An oft-cited example is the SVG 'width' and 'height' attributes, which are not presentation attributes and do not correspond to the similarly names CSS 'width' and 'height' properties.

So 'auto' here means 'is there is a property of that name, use it'. There is indeed a property called 'font-size' so that is what is being animated; and it is being animated with legal values for that property.

RL> Thus this animation is invalid.

No, it isn't, for the reasons given above.

RL> Can the three animations of font-size in the test be changed so that either

RL> a) they specify attributeType="XML"

That doesn't do what you seem to think it does.


-- 
 Chris Lilley                    mailto:chris@w3.org
 Technical Director, Interaction Domain
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG

Received on Monday, 7 June 2010 11:48:07 UTC