News for hackers. Stuff that matters.

Ask HN: Does anyone use CSS Flexbox in production?

I'm interested to hear if anyone here uses CSS flexbox in production and to what degree?

On the face of it flexbox solves a lot of the common layout problems you come across when writing CSS but every time I've tried to use it in the past I always got inconsistencies and strange bugs. However that was quite a while ago now.

I'd be grateful if anyone could share their experiences / problems they've come across

( 2 comments | 2 points | on HN )
Re:Ask HN: Does anyone use CSS Flexbox in production? by Nadya on Wednesday April 13, 2016 @12:18PM (#11489541)
Yes - shipping with Modernizer and targetting `.no-flex` browsers to provide fallbacks of course.

80% of the time we use it for vertical centering so the fallback can be `display: table` with the children being `display:table-cell` and it rarely gets more complex than that.

If you need something very complex to do what you want - I have a strong hunch the markup is the problem and not the CSS. Or you're trying to avoid using Javascript and are instead relying on a bunch of half-supported and new CSS features to hack your way around things. Which means you probably aren't coding for production anyway. :)

Re:Ask HN: Does anyone use CSS Flexbox in production? by zilean on Wednesday April 13, 2016 @12:15PM (#11489508)
Shipped several apps with flexbox layouts. If you use autoprefixer and dont touch advanced features it works like a charm on modern browsers.