4 ms·
Wasn't CSS Grids the best thing that has ever happened to CSS? Why is Flexbox keep getting recommended on its own without Grid?
by ithrow 6y ago
Wasn't CSS Grids the best thing that has ever happened to CSS? Why is Flexbox keep getting recommended on its own without Grid?
- nicoburns 6y agoIE11 doesn't have full support, so unless you're lucky enough to be able to ignore IE, you have to resort to jacks and workarounds to use grid. At which point it's generally easier just to use flexbox. Grid will be awesome very soon.
- toyg 6y agoIE (all versions) is estimated to account for less than 6% of users, these days. It’s so small it’s basically “exotic browser” territory. I think the argument these days should be “do X unless you’re unfortunate enough to care about IE”.
- deleted 6y ago[deleted]
- luckyscs 6y agoI've yet to work on a product that didn't care about IE. I look forward to that day more than I look forward to the return of the Messiah.
- nicoburns 6y ago6% is still quite a lot! IE6 and IE8 were both still widely supported until they had <1% narket share. Firefox at 8% doesn't have much more than that.
- deleted 6y ago[deleted]
- luckyscs 6y agoI find flexbox has a small, easy to learn and teach api that allows you to do almost any kind of web app layout that you would need to do, exceptions being grids and tables. Css Grid is less intuitive but they do make grid gutters much much easier. Most of the time I reach for flex box. Only when I'm doing a guttered grid would I reach for css grids. With how hard it is to get a companies UI devs on the same technology and patterns, flexbox is an easy standard to coordinate around. Not to mention it's better supported.
- JamesSwift 6y agoGrid is awesome, and I highly recommend learning what it can do for you. That said, they serve different purposes. However, between the two of them they address 97% of my needs on the frontend. This[1] is a good rundown of what the two do/dont do. [1] - https://www.youtube.com/watch?v=hs3piaN4b5I https://www.youtube.com/watch?v=hs3piaN4b5I
- _bxg1 6y agoFlexbox is for "1D layouts"; "lists" (including ones that wrap). Grid is for "2D layouts". In most cases you don't really need Grid (and it has a much steeper learning curve), but if you want to, say, mimic a <table> without an actual <table> element, Flexbox simply cannot do that.
- keanzu 6y agoPartial support in IE refers to supporting an older version of the specification. https://caniuse.com/#feat=css-grid https://caniuse.com/#feat=css-grid