CSS grid-template-rows Property Reference
The CSS grid-template-rows property is a standard property in CSS Grid Layout. Review its formal syntax, computed behavior, and practical declarations.
Updated 2026-08-12
grid-template-rows overview
The CSS grid-template-rows property is a standard property in CSS Grid Layout. Review its formal syntax, computed behavior, and practical declarations.
The property is not inherited by default. Use an explicit global keyword when inheritance is intended.
Syntax and formal definition
| Field | Value |
|---|---|
| Formal syntax | none | <track-list> | <auto-track-list> | subgrid <line-name-list>? |
| Initial value | none |
| Applies to | gridContainers |
| Inherited | No |
| Percentages | referToDimensionOfContentArea |
| Computed value | asSpecifiedRelativeToAbsoluteLengths |
| Animation type | simpleListOfLpcDifferenceLpc |
| Media | visual |
| Specification group | CSS Grid Layout |
| Status | Standard |
Practical examples
These declarations demonstrate valid ways to set grid-template-rows. The initial and inherit global keywords remain available even when a property-specific value is preferable.
CSS
.reset-example {
grid-template-rows: initial;
}
.inherit-example {
grid-template-rows: inherit;
}
@supports (grid-template-rows: initial) {
.supported {
grid-template-rows: initial;
}
}