SVG Inline content incorrectly sizes
Project Member Reported by email@example.com, Apr 15 2013
Migrated from WebKit Bugzilla: https://bugs.webkit.org/show_bug.cgi?id=82489 Originally reported 2012-03-28 11:18 PST by Stephen Chenney (firstname.lastname@example.org). Description: Created an attachment (id=134346) [https://bugs.webkit.org/attachment.cgi?id=134346] [details] [https://bugs.webkit.org/attachment.cgi?id=134346&action=edit] 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. Attachments: 2012-03-28 11:18 PST: Repro case [https://bugs.webkit.org/attachment.cgi?id=134346&action=prettypatch] Comments: ================================ Comment #1 Posted on 2012-03-29 00:22:21 PST by Nikolas Zimmermann (email@example.com) 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 (firstname.lastname@example.org) Just a note for future visitors, I had luck setting max-height: 100% on the inline svg element as a workaround.
May 20 2013,
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: http://dabblet.com/gist/5681165 because it is defaulting to height: 100%; width: 100%; <svg> within an html file is not observing the preserveAspectRatio attribute.
Aug 15 2013,
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: http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing 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?
Oct 10 2013,
I posted a related post to www-svg: http://lists.w3.org/Archives/Public/www-svg/2013Oct/0014.html to get some consensus what we should actually implement in Blink.
Sign in to add a comment