I'm trying to understand why my SVG will resize when I change the width of its parent but it won't resize when I change the height.
I just made a very simple jsFiddle. You can try resizing the little window at the bottom right corner.
From what I understand, it's key that the parent has 100% width and height so that a window resize is detected and inner svg can adjust. It's also key to specify the viewBox attribute to allow the svg to resize according to its parent div.
But why is it not resizing accorindg to height?
div {
height: 100%;
width: 100%;
}
<div>
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<circle cx="100" cy="100" r="100" />
</svg>
</div>