Skip to content

CSS Grid

CSS Grid cheat sheet

Units

1fr vs auto

Auto-fill vs Auto-fit

Auto-fill

  • 922ec503ac8c417fa3ba5fc6153c4e82.png
  • adds new empty columns that occupy space

auto-fit

  • a58ffd7243a8a657fdc3b1e5d5a8f655.png
  • make the columns fit the space
  • empty columns occupy no space

Last update: 2022-09-23