- From: Cameron McCormack via GitHub <sysbot+gh@w3.org>
- Date: Wed, 15 Jan 2020 04:51:14 +0000
- To: public-css-archive@w3.org
Consider this content: ```svg <svg width="100" height="100" viewBox="1000 1000 1000 1000"> <rect x="1000" y="1000" width="500" height="500" transform="rotate(1)"/> </svg> ``` We have `transform-box: view-box; transform-origin: 0 0;` from the initial value and the UA sheet. The origin for the rotation needs to be (0, 0) in the rect's coordinate space (i.e., far off-screen to the top-left), not the top-left corner of the viewport. As for the size of the box, ```svg <svg width="100" height="100" viewBox="1000 1000 1000 1000"> <rect x="1000" y="1000" width="500" height="500" style="transform: translate(25%, 0);"/> </svg> ``` This translates the rectangle horizontally into the middle of the viewport in Firefox and Chrome. Whether you consider the percentage to resolve against the width of a (0, 0, 1000, 1000) reference box, or visually against the width of the viewport, I guess doesn't matter. (Though maybe it would matter with `preserveAspectRatio` involved?) -- GitHub Notification of comment by heycam Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4662#issuecomment-574494916 using your GitHub account
Received on Wednesday, 15 January 2020 04:51:15 UTC