Hacker News new | ask | show | jobs
by qntmfred 4204 days ago
I remember about 4 years ago I discovered flexbox but of course it didn't have good browser support yet and there were even a few other competing proposed CSS solutions.

Just last month I started using it on a production application for the first time. We all talk about the web moving fast, but 4 years is a long damn time to have to wait. Especially considering I was doing a lot of WPF/Silverlight at the time as well and this type of layout support was built in from the start.

1 comments

You didn't really have to wait that long, I used it on a site a year ago (Autumn 2013) and managed IE8 support along with FF, Chrome, IE8+ with a combination of the 'old' flexbox and the new (+ a couple of IE hacks).
Could you please describe, or point to a resource for, the necessary IE hacks? I'd be most appreciative. Thanks!
One technique is, alongside flex, to use Sass/LESS/Stylus mixins (or just CSS classes), using float and widths: IE8/9 use those, they're ignored if flexbox is supported. It takes a little work, and you have to limit yourself somewhat, but it's reasonably robust. Effectively, you describe a float-based grid, but include all necessary flex-based declarations. Alternatively, you describe a display:table based grid, but that has fairly serious downsides.

All current hacks available are pretty fragile. Best solution is a separate set of rules scoped to .no-flexbox (or .flexbox if you're going the other way). It's a massive pain in the arse, tbh.

Thank you; people like you help change the status quo.

Anyone aware of any large sites using Flexbox that has non-tech users, e.g. Netflix or a major ecommerce site? I ask because I'd like to see any presentations or write-ups those guys may have written about their experience.