4 ms·
My flexbox story: I decided to use flexbox. Everything was wonderful - responsive sizing was perfect. So easy to use. I then tried it on Safari. First port of
by jwdunne 10y ago
My flexbox story:
I decided to use flexbox. Everything was wonderful - responsive sizing was perfect. So easy to use. I then tried it on Safari.
First port of call: older versions of Safari don't calculate widths based on min / max width property but rather a flex specific property (can't remember which).
Didn't work. Tried a polyfill - the polyfill landscape for flexbox is shockingly bad.
At this point, I'd give up hope. I turn to Modernizr so I can fall back to display table. Got this set up (modernizr only really does custom builds apparently, no CDN now).
Surprise. Safari was flagging up with modern flexbox support. The autoprefixer I used set the WebKit vendor prefix to use legacy flexbox. Chrome uses the non prefixed property fine. Other browsers were fine. Safari was still using the vendor prefix. Fin.
tl;dr flexbox embarrassed me.