CSS grid Property Reference

The CSS grid property is a standard property in CSS Grid Layout. Review its formal syntax, computed behavior, and practical declarations.

CSS grid Property Reference

The CSS grid property is a standard property in CSS Grid Layout. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

grid overview

The CSS grid 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

grid formal syntax
FieldValue
Formal syntax<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>
Initial valuegrid-template-rows, grid-template-columns, grid-template-areas, grid-auto-rows, grid-auto-columns, grid-auto-flow, grid-column-gap, grid-row-gap, column-gap, row-gap
Applies togridContainers
InheritedNo
Percentagesgrid-template-rows, grid-template-columns, grid-auto-rows, grid-auto-columns
Computed valuegrid-template-rows, grid-template-columns, grid-template-areas, grid-auto-rows, grid-auto-columns, grid-auto-flow, grid-column-gap, grid-row-gap, column-gap, row-gap
Animation typegrid-template-rows, grid-template-columns, grid-template-areas, grid-auto-rows, grid-auto-columns, grid-auto-flow, grid-column-gap, grid-row-gap, column-gap, row-gap
Mediavisual
Specification groupCSS Grid Layout
StatusStandard

Practical examples

These declarations demonstrate valid ways to set grid. The initial and inherit global keywords remain available even when a property-specific value is preferable.

grid live example
CSS .reset-example { grid: initial; } .inherit-example { grid: inherit; } @supports (grid: auto-flow / repeat(3, 1fr)) { .supported { grid: auto-flow / repeat(3, 1fr); } }

Description

The CSS grid property is a standard property in CSS Grid Layout. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: grid
  2. MDN: CSS Properties Reference

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies