6 ms·
Flex box is life. But Grids do look pretty powerful
by pbirsinger 9y ago
Flex box is life. But Grids do look pretty powerful
- n0us 9y ago"Flexbox — Getting warmer, but would result in a bunch of extra div elements that act only as containers for the actual content" I feel like I'm the only person who thinks most of CSS grid can be accomplished easily using `flex-grow` and `flex-basis` and it doesn't add that many extra divs. Grid certainly looks more semantic though.
- overcast 9y agoFlexbox and CSS Grid handle different things. Flexbox is for one dimensional layouts. CSS Grid is for two dimensional layouts.
- Scarbutt 9y agoBut if CSS Grid can handle one dimensional layout too, why not just stick to Grid? (ignoring browser compatibility).
- notahacker 9y agoFlexbox handles wrapping pretty elegantly without specifying breakpoints. More to the point, why wasn't a two dimensional layout standard with nice syntax proposed and implemented as a top priority circa 1998 when it was obvious this was how people wanted to design websites, in which case browsers might have caught up by now?
- ben0x539 9y agoi guess they just called it tables back then?
- notahacker 9y agoSay what you like about HTML tables being The Wrong Way To Do Layout Because That Is What CSS Is For, you didn't need to use polyfills or star selector hacks with them...
- jandrese 9y agoI pushed back against CSS for a long time because people were telling me that HTML tables were evil and that I should use CSS (the original) instead. So I tried rebuilding my simple three column autoscaling (the left and right columns were fixed size, the middle filled all of the remaining space) website and after waving many dead chickens I still wasn't completely happy with the results. People were pointing to stuff like CSS Zen Garden layouts that had oceans of wasted space on large screens and completely broke on small screens. Plus the documentation was written in this incredibly formal style that was very difficult to read and browser support was all over the map. In the end I went back to tables and just used CSS to set fonts and colors. Even more amazingly, CSS2 still sucked at this very obvious problem! But at least by this part people had figured out slightly less hacky workarounds (still with tons of clear: both though) that let one remove HTML tables while still retaining some sanity.
- dictum 9y agoBesides technical challenges I'm not privy to, there's this quote which might help understand why it took so long: "Actually, this was a request for this one early on in the CSS1 days as well. Me and my aesthetic thinking, I'm not a designer. You have to know that. But to me those rounded things; they look like something from the 1970s. I said, 'Nobody is ever going to need rounded borders on something.'" https://fronteers.nl/congres/2010/sessions/css3-hakon-wium-lie https://fronteers.nl/congres/2010/sessions/css3-hakon-wium-l...
- jandrese 9y agoApparently the CSS committee didn't have a resident Steve Jobs. https://www.folklore.org/StoryView.py?story=Round_Rects_Are_Everywhere.txt https://www.folklore.org/StoryView.py?story=Round_Rects_Are_...
- overcast 9y agoNo one needs rounded borders now, that's just a design aesthetic. What we do need, is proper layouts though.