5 ms·
Is it still the case that one realistically needs to write their layout in flexbox as a fallback? Last I checked grid support was about 87% globally. I learned
by AWebOfBrown 8y ago
Is it still the case that one realistically needs to write their layout in flexbox as a fallback? Last I checked grid support was about 87% globally. I learned grid at one point but then just ignored it on the basis that if I had to write everything in flexbox already, why do both? Would love to know if this is a false assumption.
- sbouafif 8y agoIt was still true 2 months ago. I did the same as you and stop using it. Here's a list of existing bugs that prevent me using it in production https://github.com/rachelandrew/gridbugs https://github.com/rachelandrew/gridbugs
- Bogdanp 8y agoDepending on your use case, you might get away with building your layout for mobile and then grid-ifying it for larger devices. That way those browsers that don't support grid will get the mobile version.
- sametmax 8y agoReally nice idea. Never though about this one. And since mobile browser are usually the ones with old engines, it make sense twice.
- modernerd 8y agoUse a simple mobile-first layout, then add "@supports (display: grid)" to enhance the layout for browsers that support grid. Mobile OS browsers and IE 10 will get a usable experience that way without having to write flexbox fallbacks. “Internet Explorer + CSS Grid????” https://www.youtube.com/watch?v=7msERxu7ivg https://www.youtube.com/watch?v=7msERxu7ivg MDN: Using feature queries https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_and_Progressive_Enhancement#Using_feature_queries https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_La...
- merb 8y ago> “Internet Explorer + CSS Grid????” well the original css grid spec actually did came from microsoft (https://www.w3.org/TR/2011/WD-css3-grid-layout-20110407/ https://www.w3.org/TR/2011/WD-css3-grid-layout-20110407/) That's why it's only partial supported, they never updated it to the current version.
- andrei_says_ 8y agoIsn’t ie11 incompatible with the official grid spec?
- modernerd 8y agoYes — I should have written IE10/11. Neither supports @supports, though, so that's still a good way to progressively enhance for grid.
- andrei_says_ 8y agoUnfortunately we’ll need to build our new site to look nice for IE11, too, as the stakeholders are locked on windows7.
- modernerd 8y agoThat's unfortunate and likely will require a flexbox/float-based fallback.
- andrei_says_ 8y agoSuzy Grids 2 is float based, a pleasure to work with and covers the old browsers. I'd love to switch to CSS grids but will have to wait another 5 years it seems.
- deckard1 8y agoI think the point is, you have to write the fallback anyway. There really is no "enhanced", as they are two different ways to reach the same solution. The user won't notice a difference, and no sane person wants to do the same thing twice just because one method is slightly cleaner. This is why CSS grids have been a nonstarter for most of us.
- sureaboutthis 8y agoflexbox was not created for, and should not be used for, page layout. It's to be used for for a series of elements that flow in one direction only and designed for sections of a page, not a whole page.
- tripzilch 8y agoEleven years ago I was freelance/part-time web developer, specialised in frontend work. If somebody from the future had shown me this comment (quoted below), even though I'd have no idea what "flexbox" or "grid" means, I'd understand, smile and say plus ça change, plus c'est la même chose ... > Is it still the case that one realistically needs to write their layout in flexbox as a fallback? Last I checked grid support was about 87% globally. I learned grid at one point but then just ignored it on the basis that if I had to write everything in flexbox already, why do both? Would love to know if this is a false assumption.