tabatkins/railroad-diagrams — pull request #13 by SimonSapin (2013-09-18 11:56:29+00:00)
Title: Allow both intrinsic sizing and scaling to the parent’s width.

As discussed in #9 with @rparree , have both width/height and viewBox attributes.

As far as I understand, setting CSS 'height' to a percentage (even though that resolves to 'auto') triggers this part of the SVG spec, so that the used height is not just the "height" attribute.

http://www.w3.org/TR/SVG/coords.html#ViewportSpace
> if there are positioning properties specified on the referencing element or on the outermost svg element that are sufficient to establish the height of the viewport, then these positioning properties establish the viewport's height; otherwise, the ‘height’ attribute on the outermost svg element establishes the viewport's height.

Blink, Gecko and Presto seem to be consistent there, but I don’t quite understand what makes the ratio be preserved. In particular, any percentage value gives the same result.

Keep the part of #9 that fixes #3.