Rendered from grid/allowed.md

CSS Grid — Allowed

This gauge covers the promoted Grid chapter after Phase 7.

Learning goal

Build two-dimensional layouts with explicit tracks, deliberate placement, responsive track repetition, and clear item/content alignment while preserving logical source order.

Inherited tools

Everything allowed through ./phase7-allowed.html remains available.

Document metadata

Grid foundations

Placement properties

Line-based placement may use positive line numbers, negative end lines, and span. Named areas must form complete rectangles.

Track functions and keywords

Alignment properties

Learning rules

  1. Grid properties affect the direct children of a grid container.
  2. Columns run on the inline axis; rows run on the block axis.
  3. Track lines number the boundaries around tracks, starting at 1.
  4. grid-column and grid-row place an item by its start and end lines; span states how many tracks it covers.
  5. grid-area may place an item into a named template area. Keep the DOM in a meaningful reading order.
  6. repeat() removes repeated track declarations; minmax() gives a track a lower and upper size.
  7. auto-fit collapses empty repeated tracks, while auto-fill preserves them.
  8. justify-items and align-items align items inside their grid areas.
  9. justify-content and align-content align the entire track collection and require spare container space to show an effect.

Not allowed

Pages

Rules to lean on

Rules 2, 10–12, 54–59, 72–80, 88, and 89–98.