I'm confused about the transform-origin
property.
According to the latest SVGV 2 draft it's a required CSS property.
According to the MDN page on SVG Presentation Attributes it's not a CSS properties that can be used as attributes on SVG elements. However according to that same page, most browsers support it as an attribute. And according to the MDN page on transform-origin
it sounds like it is an SVG attribute.
Other SVG user agents/editors such as Inkscape don't seem to support it either as an attribute or as a style property. Inkscape uses its own inkscape:transform-center-x
and inkscape:transform-center-y
attributes instead.
Is transform-origin
a standard SVG 2 attribute?
If not, why do browsers support a transform-origin
attribute?
Is there any plan to clear up its standardization?
In SVG 1.1 pretty much all CSS properties are also available as mapped attributes i.e. you can write style="display: none" or display="none"
When the SVG 2 specification was first created the authors suggested that this would not be continued with new CSS properties i.e. they would not be mapped to attributes.
Chrome and Safari however, mapped transform-origin to an attribute and eventually to be compatible with content that was starting to appear that depended on that, Firefox did too.
There's an open issue on the SVG 2 specification proposing that the specification should be changed to reflect reality.