New issue
Advanced search Search tips

Issue 231622 link

Starred by 7 users

Issue metadata

Status: Duplicate
Merged: issue 308992
Owner: ----
Closed: May 2014
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Sign in to add a comment

SVG Inline content incorrectly sizes

Project Member Reported by, Apr 15 2013

Issue description

Migrated from WebKit Bugzilla:
Originally reported 2012-03-28 11:18 PST by Stephen Chenney (

Created an attachment (id=134346) [] [details] []
Repro case

When svg is included inline with text in an html document with the width defined and a viewbox, it negotiates a 100% height. Other browsers set the height to preserve the given width and aspect ratio from the viewbox, as one would hope for.

2012-03-28 11:18 PST: Repro case []


Comment #1
Posted on 2012-03-29 00:22:21 PST by Nikolas Zimmermann (

As noted in the other bug report 82487, intrinsic sizing for inline SVG is just not implemented yet. Fortunately the framework for that is finished, it's just a matter of actually finishing it :-)


Comment #2
Posted on 2012-09-27 15:18:58 PST by Zach Leatherman (

Just a note for future visitors, I had luck setting max-height: 100% on the inline svg element as a workaround.
Project Member

Comment 1 by, May 20 2013

Labels: -WebKit-ID-82489 WebKit-ID-82489-NEW

Comment 2 by, May 30 2013

Similar issue: chrome is defaulting to height 100% and width 100% even though the UA stylesheet does not specify this and even when set to display:inline or inline-block.

Test case:

because it is defaulting to height: 100%; width: 100%; <svg> within an html file is not observing the preserveAspectRatio attribute.
Can we please get an update on this? It's been over a year, and this family of bugs is still standing. Even IE10 gets SVG intrinsic sizing right. Webkit/Blink is now the holdout.

The key part of the 1.1 spec, from my point of view, is that when either/both height or width attributes are omitted, the intrinsic proportion gets derived from the viewBox, if specified:

This is the basic "responsive" use case. If the full framework you're referring to has foundered somehow, can we get a narrowly targeted patch?

Comment 4 by, Oct 10 2013

I posted a related post to www-svg: to get some consensus what we should actually implement in Blink.

Comment 5 by, May 27 2014

Mergedinto: 308992
Status: Duplicate
Fixed by the SVG sizing rewrite in  issue 308992 .

Sign in to add a comment