Re: Changing attributeType="CSS"

On Mon, 02 Nov 2009 11:45:18 +0100, Dr. Olaf Hoffmann
<Dr.O.Hoffmann@gmx.de> wrote:

> Erik Dahlstrom:
>> How about making the 'height' attribute a presentation attribute for
>> SVG.next? I think it's possible to stay backwards compatible while  
>> adding
>> the option of specifying the width/height through CSS.
>>
>> Cheers
>> /Erik
>
> Because width and height are not essential, but more a decorative  
> question
> for an element in XHTML for example, it is a pretty good choice to
> have this as property.
> But for a rect element in SVG, width and height are the essential  
> information
> about what kind of rectangle we have, this is not decoration or styling  
> or
> presentation.

For rect I agree that it would be strange to not have dimensions in the  
markup, but OTOH you might want to "decorate" it with a different  
width/height on hovering the element for example. I guess you could  
compare <svg:image> and <html:img> too, what is the difference and why  
should you not be allowed to influence the dimensions of <svg:image> from  
CSS?

At least for the svg elements that establish viewports[1] I think it would  
be useful to let that those viewport dimensions be stylable through CSS.

> Therefore I think, they should not be presentation attributes
> or properties like fill. It would be similar to say the d attribute of  
> path
> should be only styling and decoration and the essential information is  
> only,
> that we have a path - not important, what kind of path ;o)
> Of course, once started one has to continue the game: r of circle? rx,  
> ry of
> ellipse or rect? points of polyline and polygon? x1,x2,y1,y2 of a line? -
> essential information or only presentation? ;o)

Many of the listed attributes are already indirectly tweakable (but not  
individually) through CSS Transforms. Yet 'transform' is not a  
presentation attribute in SVG, though it looks likely that it will be in  
the future given that we now have CSS 2d/3d Transforms.

Cheers
/Erik

[1] http://www.w3.org/TR/SVG11/coords.html#ElementsThatEstablishViewports

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Thursday, 17 December 2009 09:06:41 UTC