I'm struggling to understand the behaviour of the following pen (but I already have a workaround): https://codepen.io/nicoespeon/pen/BOamdJ
There are 3 flexbox containers:
- the first contains only text
- the second contains a
<svg>
element and some text - the third contains some text and a
<svg>
element
I expect all of them to be aligned. But the second box is moving up.
Note: I know that if I wrap all of them in a flex container (e.g. set display: flex | inline-flex;
to body
), they get aligned. But I don't understand how the <svg>
element is impact its flex container in the second box.
Any idea?