W3C home > Mailing lists > Public > www-svg@w3.org > December 2009

Re: Changing attributeType="CSS"

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Thu, 17 Dec 2009 12:05:07 +0100
To: www-svg@w3.org
Message-Id: <200912171205.07679.Dr.O.Hoffmann@gmx.de>
Hello,

certainly it is pretty useful for example for a group of
similar elements to inherit attribute values from the grouping
element. As often colors in SVG are not really decorative,
it is maybe only the task to describe in the specification, 
that presentation attributes are often not just decorative as 
CSS properties are, therefore authors have to distinguish between 
the technical issue, for example to inherit a value somehow from 
the question whether something is decorative or not in SVG, 
this applies much more for the property-attribute mixture in SVG 
as for CSS+(X)HTML for example, where it is simple to  distinguish 
between decoration and function.
If authors apply stylesheets to SVG documents, it is more difficult
than for (X)HTML still to provide the same information with the
styled and the not styled document. If there become more and
more functional attribute properties, it gets more important for
the specification to pronounce this problem and that authors 
have to take care, if they follow this approach.

Olaf



Erik Dahlstrom:
> 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
Received on Thursday, 17 December 2009 12:10:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 November 2012 23:53:14 GMT