grid-auto-rows

Sets the size of any rows that the browser creates automatically (implicit rows) when items spill over your explicitly defined grid rows.

It is documented as part of the CSS Grid Layout specification.

/* Usage Example */
.flexible-list {
  display: grid;
  /* Extra rows added for content will expand/shrink to fit it */
  grid-auto-rows: min-content;
}

/* Global values */
grid-auto-rows: inherit;
grid-auto-rows: initial;
grid-auto-rows: revert;
grid-auto-rows: revert-layer;
grid-auto-rows: unset;
Widely available Since 2017 95% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2017.

57+
70+
10.1+
16+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC