Comment 107 for bug 168261

Revision history for this message
ccprog (ccprog) wrote :

Luckily, browser support for svg has greatly improved since 2010...

The rules for the establishments of an initial viewport in http://www.w3.org/TR/SVG11/coords.html#ViewportSpace are fairly clear: if an embedding document sets width and height properties, stated values on the outermost svg element are overwritten. On the other hand, without viewBox, no size transformation can be applied to the content.

Modern browsers implement this (with minor discrepancies, but these fall into their own realm), so there is no longer a problem with always stating both viewBox and width/height.