News for hackers. Stuff that matters.
Re:Why is CSS the way it is? by duxup on Thursday July 23, 2020 @09:52AM (#23927352)
Heck, I would have been happy to have had flexbox day one.

I think flexbox covers 'most' folks layout needs fairly easily, and you can learn it fairly easily and get a lot out of even basic flexbox knowledge.

Tables for layout were horrific. We talk about div spam these days but at least they're all just divs and divs follow divs rules. Unlike divs table, tr, td are all different and don't follow the same rules. And the result of table layouts was table inside tr,td in another table and in another table is its own nightmare and gets ultra inflexible and could require whole hog layout changes just to move a widget if the widget was just a bit too big. Tables were horrible.

Just flexbox day one would have been amazing.

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.
Re:Why is CSS the way it is? by duxup on Thursday July 23, 2020 @10:55AM (#23927960)
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.

Re:Why is CSS the way it is? by asddubs on Friday July 24, 2020 @01:58PM (#23942539)
wish I could use grid yet, I'm still supporting ie11 and safari 9 (i know ie has a janky grid prototype, I would maybe even put up with that if safari worked as well)