Posts Tagged ‘safari’

CSS Flexbox not wrapping on iOS

Sunday, April 24th, 2016

I had a problem where flexbox didn’t wrap on iOS but worked fine on all other browsers.
Thankfully it turned out to be a simple fix, on my flexbox child item I had to change

flex: 1

to

flex: 1 0 $minWidth; // Just 'flex: 1' will break wrapping on iOS.

where $minWidth is the minimum desired width of the flexbox child item.