Journey

A Design System

The Grid

A digital frontier. I tried to picture clusters of info ...

Rather than build an incredibly complex grid system that never gets used, I’m starting with simpler grid bases of only two, three, or four columns. Using CSS grid, I have created a few different variations of three and four column grids that can take any content within, provided the matching number of elements is provided. Grids can then be nested for more complexity if needed.

Grid variants #

Evenly distributed #

Very often, you just want a grid of evenly distributed elements. These are perfect for that scenario. At narrower viewports (< 800 px), the three and four column grids will revert to a two column grid.

Two-Up
A simple evenly distributed two column grid.
Three-Up
A simple evenly distributed three column grid.
Four-Up
A simple evenly distributed four column grid.

Unevenly Distributed

And sometimes you want to have uneven columns, whether that's because you want a sidebar, because you want to accentuate bodies of text with imagery, or for any other layout reasons.

One-Two
A two-column grid with the left one-third width and the right column two-thirds width.
Two-One
A two-column grid with the left column two-thirds width and the right one-third width.
One-Three
A two-column grid with the left one-quarter width and the right column three-quarters width.
Three-One
A two-column grid with the left column three-quarters width and the right one-quarter width.
One-One-Two
A three-column grid with the left two columns one-quarter width and the rightmost half width.
One-Two-One
A three-column grid with the left and right columns one-quarter width and the center half width.
Two-One-One
A three-column grid with the left column half width and the two rightmost columns one-quarter width.

Mobile grids

By default, grid elements will stack vertically on mobile devices. To define a particular grid container to work horizontally on mobile devices, add the mobile-grid class to the grid container.

Mobile Grid
This grid will work horizontally on mobile devices.

Gap variants

There are several utility classes for grids to give more or less space between grid elements. It is important to note that these only affect the gap property, so it will not change the outer padding or margins. By default, the gap uses --space-m (which roughly works out to 13-16 pixels depending on the viewport width).

Default
Uses --space-m which works out to 13-16 pixels
No gap
Uses --space-none which is zero pixels
Tight gap
Uses --space-xs which works out to 6-8 pixels
Comfy gap
Uses --space-l which works out to 19-24 pixels
Loose gap
Uses --space-xl which works out to 26-32 pixels

Nesting grids

Because the grid system is built with CSS Grid and only uses gap to define the gutters between grids, you can nest these to create much more complex grids as needed. Here are just a few examples:

Three-Up nested inside four-up

Four-Up nested inside two-up

Or get really creative …

Page updated on May 8, 2025