On this page
  1. grid-template-columns
  2. Syntax & Overview
  3. Notes & Best Practices
  4. Example

grid-template-columns

Prev: `align-items` | Up: layout | Next: `gap`
Rel: layout, Display & Layout Guide
Ref: MDN Web Docs — grid-template-columns
Tags: #public #web #css #properties #layout #tier/core


Syntax & Overview

grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));

Defines column track sizes in a CSS Grid container.

Notes & Best Practices

Example

.app-shell {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 1.5rem;
}

Linked from

Related notes