Re: Some practical issues integrating the SVG transform attribute with CSS transform properties

Am 25.03.2011 um 06:01 schrieb Robert O'Callahan:

> 1) Elements with SVG transform attributes must default to top-left as their transform origin, but CSS transforms default to the center. Here are two options for resolving this:
> 1a) Introduce a UA style rule that sets transform-origin to "top left" for all SVG elements.
> 1b) Make the "transform" presentational attribute map the CSS transform-origin property to "top left".
> 1b makes setting CSS 'transform' on an SVG element consistent with non-SVG elements; the element rotates around its center by default. But it makes setting the "transform" attribute on an SVG element different from setting the CSS "transform" property on the element; the former sets transform-origin but the latter does not. 1a is the other way around; setting the SVG "transform" attribute would behave consistently with setting the CSS "transform" property, but setting CSS transforms on an SVG element would behave differently to an HTML element, by default. Which consistency is more important? I propose choosing consistency between the "transform" attribute and the "transform" property, option 1a.

I thought that previous telcons already decided to take 1a? Nevertheless I'd agree to 1a, this is downward compatible to already existing webpages using CSS Transform. Would it be possible to switch to the behavior of CSS for SVG 2.0? Or should SVG 2.0 be downward compatible to  1.x in this case? I bet most SVG's out there are affected by such a decision if they do not provide a version number.

Greetings,
Dirk

Received on Friday, 25 March 2011 07:24:38 UTC