W3C home > Mailing lists > Public > public-fx@w3.org > July to September 2010

RE: [css21][css3][svg] SVG and unit-less length values

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Wed, 28 Jul 2010 12:04:19 +0200
To: public-fx@w3.org
Message-Id: <201007281204.19984.Dr.O.Hoffmann@gmx.de>

due to my (animation) tests I created in the last weeks, no viewer is 
currently completely right if an author really uses a mixture of units in an 
SVG document, especially not within animation. Most viewers create 
completely nonsense for different reasons and bugs.

For authors it is hardly to predict, what is displayed, if units are used
within SVG documents.

Therefore the best approach for authors is, what is already the only
way for the tiny profiles: use only local units.
If one needs an absolute size or one in em, ex, percentage for the complete
SVG document, one should use a viewBox and the corresponding
unit only within the values of width and height of the root svg element.
Even this causes problems with some viewers, at least if other units
are used than px or percentage. 
If an author uses units within an SVG document, it is predictable, that the
results from different viewers are quite different, some not usable for the
audience at all.
This problem is much worse for SVG than for (X)HTML+CSS, because 
(X)HTML has some amount of self-adjustment and another mechanism
to be scalable than SVG - and in doubt for (X)HTML+CSS the audience
can simply switch off the decorative CSS, if it causes too many problems.
It is typically not a good idea for SVG to switch off somehow presentation
attributes (apart from the problem, that this is not possible).

This indicates already, that the seemingly simple unit issue is a
big barrier for an arbitrary SVG implementor.
To be usable and predictable for authors, there is a practically zero
tolerance for bugs.
For authors additional units mainly blow up the source code
of documents and the complexity for the document is increased.
On the other hand there are not much benefits for authors with
other than local units, relative (to the boundingBox) units and 
percentages within SVG with the exception of width and height
of the root svg element.

Received on Wednesday, 28 July 2010 10:10:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 22 June 2015 03:33:44 UTC