3 ms·
That's great that you've learned a tool that covers all your needs. I've only used grid for responsive image galleries like https://labs.jensimmons.com/2016/ex
by wonger_ 2y ago
That's great that you've learned a tool that covers all your needs.
I've only used grid for responsive image galleries like https://labs.jensimmons.com/2016/examples/image-gallery-grid-1.html https://labs.jensimmons.com/2016/examples/image-gallery-grid... or responsive cards like https://every-layout.dev/demos/grid-cards/ https://every-layout.dev/demos/grid-cards/. `grid-template-columns` is good to learn. `grid-gap` is convenient. Flexbox seems to handle everything else.
But I'm still iffy about grid template areas. The article makes a case for easily adjusting layouts per breakpoint, or "for team members who might need to change a layout." Maybe I'm just not the target audience.
- bobthepanda 2y agoGrid template areas is very similar to traditional print layouts that are constrained with both a width and height. If you need something like grid-auto rows it is less useful. But what’s nice about it is that, if you want them, grid areas are extremely declarative. With non-area templating, you are defining the layout based on the items, and that can be challenging.
- yurishimo 2y agoIf you can target (somewhat) modern browsers, then you can also use `gap` with Flexbox. Works great! https://caniuse.com/mdn-css_properties_gap https://caniuse.com/mdn-css_properties_gap (no IE 11 support)