Dumb CSS question: I set width in %, but the width of the parent depends on that of its children - how does it work? codepen.io/thebabydino/pen/y…
6
1
6
the innerText of .boo is the defining factor for the width. It stretches out .boo, and thus .parent.
1
Pretty sure a fellow like @gregwhitworth can tell you the details on how layout is calculated in this case.
1
good question, this is due to being in a shrink to fit context, so the %s are resolved against the content measurement
2
This could be done better in many cases, but the Web depends on the current behavior.
Oct 12, 2016 · 11:42 PM UTC
1
1



