The first time I really tried to understand sizing in Flexbox, I got stuck. Not because I didn’t understand width and height .Not because I didn’t know flex-grow or flex-shrink . But because everything I thought I knew about sizing suddenly stopped applying .
In normal layout, things feel predictable:
Block elements fill width
Height depends on content
width and height behave like firm instructions
Then Flexbox shows up… and starts bending those rules.
The Moment Things Started Breaking
I remember setting width on a flex item and expecting it to behave normally.It didn’t.Then I tried adjusting height .…