User Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0 Build ID: 20120420145725 Steps to reproduce: Hi, I write video games in SVG and I noticed the behavior of FF has changed since FF10 or 11 (rendering my games unplayable). I create all my SVGs with just a viewBox (no width and height DOM attribute) and I set the dimensions with CSS styles (usually to 100% in both width and height). Actual results: The image is not scaled as it used to be before. Before, the image was scaled according to the xMidYMid default value. Now if the browser window has a width > height, the image is scaled to height x height and a slider is displayed (see sample .html file). In a pure svg document, the scaling still works as expected. Expected results: The svg element should be scaled like the equivalent svg element in the pure svg document.
There were recent spec changes in terms of SVG sizing. Not sure which release the corresponding code changes went into...
Component: DOM: CSS Object Model → SVG
QA Contact: style-system → general
Does adding width/height of 100% to the svg elements fix it.
Things changed in Firefox 11 when bug 611099 landed.
Yes, adding width="100%" height="100%" to the svg element does the trick. Thanks for the quick reply, you can mark the problem fixed as far as I am concerned.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 736431
You need to log in before you can comment on or make changes to this bug.