Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Define how <image> and <img> deal with width & height, and media queries #289
Most browsers scale the SVG image to the dimensions of the
Firefox differs. For
I can't see where these rendering characteristics are defined, apologies if they are.
referenced this issue
Oct 10, 2016
This is related to #249, in that they both address undefined aspects of how SVG scales to fit when used as an image.
For media queries, I would expect that dimensions are always measured in CSS pixels, and device pixel ratio would only show up in resolution queries. Where it gets confusing is when you're drawing an image into a scaled coordinate system (e.g., another SVG with a viewBox, or a CSS img that has had a transform applied, or a canvas where the bitmap size doesn't match the rendered size in CSS px). The issue with canvas, of course, is that there is currently no way to set high dpr other than to double the bitmap size and scale down.
Yeah, definitely part of #249. Sorry, I didn't see that on a quick search of the issues.
My gut feeling is that transforms shouldn't change the viewport size of SVG as scaling an iframe doesn't.
With bitmap APIs like
Firefox issue for the incorrect viewport setting https://bugzilla.mozilla.org/show_bug.cgi?id=986403
Firefox issue for clipping