Skip to content

maxlk/svg-transform-origin-attribute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

SVG transform-origin attribute

This page shows usage examples of SVG transform-origin attribute.

It's purpose is to demonstrate Safari's Bug #201854.

Image in Figure 1 is composed from SVG primitives without any transform appplied to them. It's a reference image.

All other images are recreating the reference image with usage of transform. All those images should look the same. They look the same in Chrome and Firefox. In Safari images in section 2 and 4 are broken. It seems like transform-origin attribute is applied only to transformations defined in transform CSS property, but not in transform SVG attribute.

For example, this is broken in Safari

<use href="#target" fill="blue" transform="scale(0.75 0.75)" transform-origin="100 100"/>

while this is rendered correctly

<use href="#target" fill="blue" style="transform: scale(0.75, 0.75);" transform-origin="100 100"/>

License

CC0-1.0 Creative Commons Zero 1.0 Universal (CC0 1.0) Public Domain Dedication