DEV Community

Discussion on: CSS Grid Areas are amazing

Collapse
 
stevetwitte profile image
Stephen Taylor Witte

Great article about an excellent addition to CSS! I would add that this doesn't replace the functionality provided by flexbox as that is still a better solution in some cases. A dynamic length list of cards is one example that comes to mind.

Collapse
 
kenbellows profile image
Ken Bellows • Edited

Oh, definitely, Flexbox has plenty of advantages on many circumstances. I didn't mean for this article to be a proper intro to Grid, so I didn't bother with the usual "when to use it" discussion.

Actually though, regarding your example with cards, depending on what the cards look like I might still use Grid in order to keep the elements of the cards inline with each other, keep them the same height and all that. I'm actually currently working on a post about just that topic right now, and how display: contents and the upcoming subgrid addition factor into that kind of a layout.

Collapse
 
stevetwitte profile image
Stephen Taylor Witte

Can't wait!

Thread Thread
 
kenbellows profile image
Ken Bellows

ICYMI, I published it yesterday! dev.to/kenbellows/why-we-need-css-...