I'm trying to use a svg element that resizes with the container size in a flexbox, but for some reason it messes up the size of a div (with text) below the svg. (How much changes when you resize the browser window)
Here are the basic css properties I'm using for all this:
[layout] {
box-sizing: border-box;
display: flex;
}
[layout=column] {
flex-direction: column;
}
[layout=row] {
flex-direction: row;
}
[flex] {
box-sizing: border-box;
flex: 1;
}
HTML:
<div class="content" style="height: 100%;" layout="row">
<div class="card" layout="column" flex>
<div class="toolbar" layout="column">
<span>Test</span>
</div>
<div class="card-content" layout="column" flex>
<div layout="column" flex>
<div layout="column" flex>
<div layout="column" flex
style="background:green;">
<svg viewBox="0 0 50 50">
<circle r="25" cx="25" cy="25">
</svg>
</div>
</div>
<div>Text</div>
</div>
</div>
</div>
</div>
Codepen: http://codepen.io/anon/pen/rVJepm
How can I fix the sizing when using a SVG?