css.properties

grid-template-rows

The grid-template-rows property specifies the rows of a grid.

Formal Syntax

none | <track-list> | <auto-track-list> | subgrid <line-name-list>?

See specification

JavaScript Access

// Access via element.style
element.style.gridTemplateRows = 'none';

Browser Support

standard | MDN · Spec · Spec

FeatureChromeFirefoxSafariEdge
grid-template-rows575210.116
animation1076616107
auto575210.179
fit-content575210.116
masonry77preview
max-content575210.179
min-content575210.179
minmax575210.116
none575210.179
repeat577610.116
subgrid1177116117

Behind a Flag

Some browsers require enabling a flag or preference:

  • grid-template-rows: masonry — firefox: #layout.css.grid-template-masonry-value.enabled = true (since 77)

Related Properties