coderef

SubgridBaseline · Widely available

The subgrid value for the grid-template-columns and grid-template-rows properties allows a grid item to inherit the grid definition of its parent grid container.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 15, 2023. Widely available since Mar 15, 2026.

Browser support

DesktopChrome
1–116Not supported
117+Supportedsince Sep 12, 2023
Current: 155
Edge
12–116Not supported
117+Supportedsince Sep 15, 2023
Current: 154
Firefox
1–70Not supported
71+Supportedsince Dec 10, 2019
Current: 157
Safari
1–15.6Not supported
16+Supportedsince Sep 12, 2022
Current: 27
MobileChrome Android
18–116Not supported
117+Supportedsince Sep 12, 2023
Current: 155
Firefox Android
4–68Not supported
79+Supportedsince Jul 28, 2020
Current: 157
Safari iOS
1–15.6Not supported
16+Supportedsince Sep 12, 2022
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

CSS
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

/* Each card's rows line up with its siblings' rows */
.card {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
}

Feature detection

CSS · check before using
@supports (grid-template-columns: subgrid) {
  /* styles that rely on grid-template-columns: subgrid */
}

/* or in JavaScript */
if (CSS.supports("grid-template-columns", "subgrid")) {
  // use it
}

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
grid-template-columns.subgrid11711771161177916
grid-template-rows.subgrid11711771161177916