w3c/svgwg

Why most of SVG 2 properties are not presentational?

RazrFalcon opened this issue · 4 comments

https://www.w3.org/TR/SVG2/styling.html#PresentationAttributes

The docs have the following comment:

In the future, any new properties that apply to SVG content will not gain presentation attributes. Therefore, authors are suggested to use styling properties, either through inline ‘style’ properties or style sheets, rather than presentation attributes, for styling SVG content.

Why is that? Does it mean that a conforming SVG 2 writer should use only the style attribute instead of normal XML attributes?
Personally, I think that the style attribute isn't human-readable, unlike normal XML attributes.

I there are some rationale behind such decision?

I think, here something went completely wrong in the SVG 2 draft once more.

In the tiny profiles 1.1 and 1.2, there are only presentation attributes.
To avoid them in 2 would cause a lot of trouble.

Additionally, the purpose of such attributes and styling is different.
If authors note attributes, those matter for content and understanding of content, styling ist just about an alternative presentation, additionally to this basic variant.
Well, if we remove all attributes from typical SVG documents, which are considered in the SVG 2 draft to be only decorative (styling), one will see, that the content and its presentation is not meaningful anymore, an obvious indication that those attributes are relevant for content, not only for styling.

This is completely different from the situation of XHTML+CSS.
For good XHTML documents, there is no loss of information, if the interpretation of stylesheets (and scripting) is switched off - if such loss is the case, it is an obvious indication, that such documents are completely borked (what happens meanwhile for a lot of published content, indicating a lot of abuse of CSS and scripting).

Therefore it is useless to have the same approaches vor XHTML and SVG concerning styling, to get even more borked content from SVG.

However, currently, there seems to be no relevant activity, that SVG 2 will ever become a recommendation anyway, what is good, because those draft is meanwhile far away from the initial requirements, new features intended for SVG 2, this draft is completely borked. SVG 2 needs to be created right from the starting point (SVG tiny 1.2, list of required features, additional available modules) again to become something useful for authors.

I would understand differentiation between something like width and fill. In that case the latter is obviously just a style.
The problem is that SVG 1 had no such separation and SVG 2 suddenly has.
Moreover, SVG 2 allows width to be a "style" property now. Which doesn't make any sense.

In SVG 2, you basically write XML as <rect style="..."/>, which is absurd, because XML already has a syntax for individual properties.

Also, it's completely inconsistent. Especially for text properties. font-family="Arial" is fine, but font-kerning="none" isn't. Try explaining that to a user...

However, currently, there seems to be no relevant activity, that SVG 2 will ever become a recommendation anyway

Are you sure? Browsers actively implementing it. It's already marked as Candidate Recommendation. And more and more people and tools rely on SVG 2 features.
As an SVG library author I cannot simply ignore SVG 2 just because it's not a true standard yet.

There seems to be a new 'Charter' now for the working group, but this year no visible activity or discussion to fix all these bugs or to complete SVG 2 to something meaningful for authors by adding the features, once identified to be required for SVG 2. Even worse, in the last charter period, most of already defined features were removed again.
If nothing ist changed, SVG 2 can be considered to be failed for authors.
Authors should ignore the draft simply.
Implementors should care to complete at least the full set of SVG 1.1 and SVG tiny 1.2 before publishing any software, that contains additional funny changes due to the SVG 2 draft. This would be a progress already for authors.

About styling prooerties: Even fill and stroke are typically not only styling.
Often only fill without stroke or stroke without fill is used - nonsense to claim, that this is redundant information concerning understanding.
Even different colors of different objects typically contains information, because it is used to indicate, that these are different objects, not joined together - or the other way arround, overlapping with the same color in a group, that they represent one object, because those draft about composition (draft from 2011!) is not available yet.

More about inactivity:
Draft about connectors: 2011, draft about transforms from 2009, parameters from 2009, SVG integration from 2014.
Some efforts ended as a note like accessibility? :-(
Well, at least some activity on Animation 2 (but only an editors draft from this year for a basic feature of SVG 2)

Looking at these dates, not much efforts in the past ~10 years about SVG at all.