W3C home > Mailing lists > Public > www-svg@w3.org > July 2014

Re: Default attributeType for new presentation attributes and SVG DOM

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Sat, 5 Jul 2014 17:02:46 +0200
To: www-svg@w3.org
Message-Id: <201407051702.47105.Dr.O.Hoffmann@gmx.de>

attributeType="XML" can be helpful, if one wants to provide an alternative 
stylesheet causing a static presentation.
Because some people might have problems with dynamic content,
this can be used as an option to provide an accessible static
alternative for this group, avoiding a declarative interactive begin
of the animations for the others (for example newer firefox versions have 
bugs concerning declarative interactivity, users of this viewer could not
start the animation).

Dirk Schulze: "The CSS cascade is mostly overridden. Exception: CSS 
Currently, for SVG 1.1 and 1.2 CSS transitions/animations are clearly not
applicable. SMIL seems to implicate, that animations of attributeType="CSS"
have higher priority than any CSS stylesheet. If there is a need for a
deviating behaviour, this needs to be defined in SVG 2, if not already done.

Dirk Schulze: "Older content would not be affected anyway. It is unlikely that 
there is SVG content that assumes that the �width� attribute is a CSS 

For SVG 1.1 or 1.2 files, clearly such a new property is not applicable, 
therefore they must have no effect. If SVG 2 introduces new properties
with the same name as old attributes of SVG 1.x, this causes a minor
conflict/problem, but only for such viewers, which do not care about
version indications, or authors, who did not note the SVG version, 
the file is intended for.

Of course in projects with both styled (X)HTML and SVG in use
(I have such CSS documents in practical use, but my assumption is,
that there is not a big number of other projects doing this),
it can happen due to unspecific selectors, that the selector matches
both for (X)HTML and SVG elements. Because SVG 1.x has no
'width' property, there is no need for authors to care about such
a match. If SVG 2 introduces such properties, there is a need to
care about this and to increase the specifity of a selector.
And if we take into account viewers, which do not care about versions,
there is an obvious risk, that those will fail for current stylesheets.
If we assume, that such viewers will exist in the future, SVG 2 simply
should not introduce new properties with the same name as attributes,
chosing another name or a name with a suggestive prefix could be an
option to avoid, that 'versionless' viewers will fail due to such new features
for current content.

Dirk Schulze: "IIRC Blink already made �width� and �height� presentation 
attribute for <svg>"

This is clearly a bug for SVG 1.x documents, did you already report it?


Received on Saturday, 5 July 2014 15:03:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:37 UTC