Re:Why is CSS the way it is?
by cageface on Thursday July 23, 2020 @10:37AM
(#23927789)
I often use grids when flex would do just to take advantage of the grid gap features. Once the more general gap feature lands in most browsers I’ll probably start using flex more again.
[ Parent
| on HN ]
Yeah there's reason to use grids, particularly if you're comfortable with them. I like to start with flexbox if I don't know where things are going / I'll need grid and .. surprisingly I rarely have to move on to grid.
Granted I'm mostly working on business apps, not a lot of complexity there layout wise, flexbox works great for that, and it's not a heavy lift for someone to learn it.
Re:Why is CSS the way it is?
by ProstetnicJeltz on Thursday July 23, 2020 @12:07PM
(#23928831)
I too am looking forward to that. 99% of the time `&>:not(:last-child) { margin-right: 4px; }` does the trick, but that 1% (usually wrapping) normally leads to compromises.
Re:Why is CSS the way it is?
by aahhahahaaa on Thursday July 23, 2020 @05:29PM
(#23932490)
It's not really 1 vs the other IMO. I use flexbox within grid quite often, for example. They're two different tools with some overlap...
Grid is absurdly more powerful for full-page layout than flexbox (which is amazing for individual columns or rows). Especially once we start getting subgrid. The common comparison is 1 dimensional (flex) vs 2 dimensional (grid) layout.