CSS Showcase · Live Demo

CSS Grid, six presets deep.

Swap between grid-template-columns, grid-template-areas, and auto-fit / auto-fill inside a device frame.

Grid playground

1
2
3
4
5
grid preset
styles.css
.grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(80px, 1fr));
  gap: 6px;
}
/* Tracks stretch to fill remaining space. */

CSS features used

  • • grid-template-columns
  • • grid-template-areas
  • • minmax() + auto-fit
  • • auto-fill vs auto-fit
  • • grid-auto-flow: dense
  • • span / row-span

Every preset is real Grid — no JS layout math, no media queries for auto-fit.