Search code examples
htmlcsssvgw3chtml5boilerplate

Should SVG contents be visible outside an embedded <svg> by default?


In the past I answered a question about "who was wrong" in regards to SVG images not being "cropped" (overflow: hidden) in IE9, where all other supporting browsers did so. The answer is here.

Today, while reviewing HTML5 Boilerplate again, I noticed that they claim they "[correct] overflow not being hidden in IE9" with this bit of code:

svg:not(:root) { overflow: hidden; }

I'm looking for someone to confirm or deny my original research by pointing to some other note in either the HTML5 or SVG specs. I cannot find anything, but I want to be sure I am not missing something.

The best I can find is that they are trying to apply rule 7 here, but that should only apply to an SVG Document, like via an img tag or when loaded directly.


Solution

  • The SVG specification has this to say: http://www.w3.org/TR/SVG/styling.html#UAStyleSheet

    Seems similar to what Firefox and Chrome do no?