This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28000 - Use UA style instead of prose to handle the exception of transform-origin for SVG
Summary: Use UA style instead of prose to handle the exception of transform-origin for...
Status: RESOLVED MOVED
Alias: None
Product: CSS
Classification: Unclassified
Component: Transforms (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Fraser
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-12 05:30 UTC by Dirk Schulze
Modified: 2017-01-13 18:08 UTC (History)
6 users (show)

See Also:


Attachments

Description Dirk Schulze 2015-02-12 05:30:16 UTC
Use UA style instead of prose to handle the exception of transform-origin for SVG.

Firefox:
/* Set |transform-origin:0% 0%;| for all SVG elements except outer-<svg>,
   noting that 'svg' as a child of 'foreignObject' counts as outer-<svg>.
*/
*:not(svg),
*:not(foreignObject) > svg {
  transform-origin:0 0;
}


WebKit/Blink:
/* CSS transform specification: "transform-origin 0 0 for SVG elements without associated CSS layout box, 50% 50% for all other elements". */
 
* {
    -webkit-transform-origin: 0 0;
}

html|* > svg {
    -webkit-transform-origin: 50% 50%;
}
Comment 1 Simon Fraser 2017-01-13 18:08:45 UTC
https://github.com/w3c/csswg-drafts/issues/920