Re: [csswg-drafts] [css-transforms] UA stylesheet rule to give SVG elements a default transform-box value of view-box

We might as well follow the syntax in the [user agent stylesheet from SVG 2](https://www.w3.org/TR/SVG2/styling.html#UAStyleSheet), which sets default values of `transform-origin`.  (Note that that user agent stylesheet uses a default namespace rule).

`svg|*:not(svg), svg|*:not(foreignObject) > svg {transform-box: view-box}`

The important net difference from the above is that SVG elements that are direct children of foreignObject elements are excluded.

In other words, SVG namespaced elements are set to `transform-box: view-box` _except_ for the elements that have CSS layout  boxes:

- root `<svg>` elements
- inline SVG elements that are direct children of non-SVG elements
- an `<svg>` element that is the direct child of a `<foreignObject>`


-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/928#issuecomment-292342326 using your GitHub account

Received on Thursday, 6 April 2017 22:26:14 UTC