Web Compat: SVG-in-img with height/width but no viewBox should scale without aspect ratio control
Fixed Issue #11305302
Steps to reproduce
Edge made a lot of web compat fixes (relative to IE) to match other browsers’ behavior when it comes to SVG with viewBox attributes. However, it discovered one remaining mis-match while compiling all the possibilities.
Steps to reproduce:
- An SVG file that has defined height and width (attributes on the root
svg
element), but noviewBox
. - Embedded as an
img
in an HTML page. - That
img
is given defined height and width that do not match the aspect ratio of the SVG’s height and width.
All the other browsers scale it the way they would a non-SVG image, with no aspect ratio control. Edge scales it with aspect ratio control, as if it had an SVG viewBox matching its height and width.
Not really a “standards” issue, since the standards around this are still not well written. But maintaining de-facto standards is an important first step to making those written standards happen!
Full CodePen:
http://codepen.io/AmeliaBR/pen/VpPWOo/?editors=1000
Just the example where Edge doesn’t match Gecko/Blink/WebKit:
http://codepen.io/AmeliaBR/pen/ad0e21cdbc96a6fe87ba8d756883c78b/?editors=1000
You need to sign in to your Microsoft account to add a comment.
Sign in