Skip to content


Normalizes Object#SVG Size and Alignment #99

wants to merge 1 commit into from

3 participants


Resolves Normalize.css Issue #96


And here are screenshots in every browser showing consistency - just in case you need it.

@necolas necolas was assigned

Really thorough work on the issue @andrewheins, it's good to have such a comprehensive set of results for any quirk. Thank you for sharing.

However I think if this was added it would not be without some problems. The performance of attribute substring selectors is pretty poor, and asking a browser to evaluate the rules would be cumbersome, more so given SVG usage is still low.

Perhaps the solution could be to add this but commented out and with a URL to a resource detailing the issue?


I think that's a fair solution.

Another option might be to create a utility class the user could add to the object element, which would allow selective implementation, but I'm not sure how well utility classes mesh with the intent of the project - normalize seems to be aiming more for a set-and-forget universal implementation instead of selective implementation.

If @necolas can let me know what direction he'd prefer, I'll write up my documentation and get back to you with a url.


Thanks a lot for getting back to me about this. I like to mull over certain changes for a while and have a chance to do my own tests as well.

I'd definitely encourage you to document your research on your blog because it might be useful to developers in general. And if the utility class ends up being a better fit, then it's the sort of thing we'd consider for inclusion in the HTML5 Boilerplate helper classes. Thanks again!


Andrew, did you ever get around to documenting this code somewhere? Thanks


Yeah, no hurry. I was just curious and felt like reading about the work you did. Thanks


Thanks but closing. See #96

@necolas necolas closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 12, 2012
  1. @andrewheins

    Normalizes Object#SVG Size and Alignment

    andrewheins committed
    Resolves Normalize.css Issue #96
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 0 deletions.
  1. +9 −0 normalize.css
9 normalize.css
@@ -333,6 +333,15 @@ svg:not(:root) {
overflow: hidden;
+ * Normalizes object SVG sizing across all browsers
+ */
+object[type="image/svg+xml"], object[data$=".svg"], object[data$=".svgz"] {
+ width: inherit;
+ height: inherit;
/* =============================================================================
Something went wrong with that request. Please try again.