353 CSS Grids [2d]

Posted Over 1 year ago. Visible to the public.

If you've stumbled over display: grid while reading the Flexbox material of the previous card - we've got you covered!
Let's dive into this topic with a quote Show archive.org snapshot :

Flexbox is made for one-dimensional layouts and Grid is made for two-dimensional layouts.

You will learn more subtle differences in the linked material below, but you can remember this as a rule of thumb.

Ressources

Exercise

  • Go back to the Practice: Cards exercise of the BEM pattern card
  • Rework your previous solution. It should now use display: grid wherever possible and reasonable

Tip

Can you reduce the number of container elements in your DOM by switching from Flexbox to Grid?

Michael Leimstädtner
Last edit
About 14 hours ago
Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted by Michael Leimstädtner to makandra Curriculum (2022-12-07 08:18)