Design grid systems

From Intense-Visions/harness-engineering · View interactive version

Design grid systems is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Grid theory — column, modular, baseline, and compound grids, gutter rhythm, and breaking the grid intentionally for emphasis

How to use this skill

Skill file

Grid Systems

Grid theory — column, modular, baseline, and compound grids, gutter rhythm, and breaking the grid intentionally for emphasis

When to Use

Instructions

  1. Choose a grid type based on content structure. There are five fundamental grid types — each solves a different layout problem:
  1. Set column count by content needs, not convention. The 12-column grid is popular because 12 divides evenly by 2, 3, 4, and 6 — but it is not always correct:

Material Design's responsive grid uses 4/8/12 at breakpoints 600dp and 840dp. Stripe's marketing pages use 12 columns but constrain content to the inner 8, creating generous margins.

  1. Size gutters proportionally. Gutters (the space between columns) control density and readability:
  1. Set margins to frame the content. Margins are the space between the grid and the viewport edge:
  1. Establish a baseline grid for vertical rhythm. Every vertical measurement should be a multiple of a base unit:
  1. Break the grid intentionally for emphasis. A grid break works because it violates an established pattern — the viewer notices the violation. This only works if the grid is otherwise consistent:

Details

Grid Anatomy Reference

| Component | Definition | Typical Values |

| --------- | -------------------------------- | ----------------------------- |

| Column | Vertical content container | 60-120px width at desktop |

| Gutter | Space between columns | 16-32px |

| Margin | Space between grid and viewport | 16-80px |

| Field | Modular grid horizontal division | Height based on baseline unit |

| Flowline | Horizontal alignment line | Aligns to baseline grid |

Anti-Patterns

  1. Gutterless grids. Columns with no space between them cause content collision. Text from one column bleeds visually into the next. Even a minimal 8px gutter provides enough separation. If you see content that feels "cramped," the first diagnosis is missing or insufficient gutters.
  1. Inconsistent margins. Left margin at 20px, right at 32px — this is not a design system, it is a mistake. Margins must be symmetric (or intentionally asymmetric for a specific purpose like a fixed sidebar). Stripe's symmetric margins create a centered, balanced frame.
  1. The 12-column trap. Defaulting to 12 columns for everything, even when the layout only needs 2-3 content zones. A simple landing page with a hero, features section, and footer needs at most a 3-4 column grid. Using 12 columns adds complexity with no benefit and makes responsive behavior harder to manage.
  1. Ignoring the baseline. Vertical spacing that uses arbitrary values (13px, 27px, 41px) instead of baseline multiples. This destroys vertical rhythm — elements feel randomly placed even if they are technically aligned horizontally. Audit by checking: is every vertical spacing value a multiple of 4 or 8?

Choosing a Grid: Decision Procedure

Use this flowchart to select the right grid type for any project:

  1. Is the content primarily long-form text? Manuscript grid — single column, 60-75 characters wide.
  2. Is the content a collection of similar items (cards, products, images)? Modular grid — equal cells with consistent aspect ratios.
  3. Is the content mixed (text blocks, images, CTAs, data) with 2+ distinct zones? Column grid — assign different column spans to each zone.
  4. Do you need multiple independent layout zones on the same page (e.g., editorial sidebar + news feed + ad rail)? Compound grid — overlay two column grids with different column counts.
  5. In ALL cases, add a baseline grid underneath. The baseline grid is not an alternative to other types — it is a vertical rhythm layer that combines with any horizontal grid.

Grid Math

For a 12-column grid inside a 1200px container with 24px gutters:

This math matters when setting max-widths, image sizes, and component widths. Hard-coding pixel values without understanding the underlying grid math leads to layouts that break at different container sizes.

Real-World Examples

Material Design 3 Responsive Grid:

Stripe Marketing Pages:

Airbnb Card Grid:

Apple Developer Documentation:

Source

Process

  1. Identify content types and their structural needs (text columns, card grids, data tables)
  2. Select grid type and parameters (column count, gutter width, baseline unit, margins)
  3. Validate by checking that all spacing values are multiples of the base unit and that the grid supports all required layout variations

Harness Integration

This is a knowledge skill. When activated, its content is injected into the system prompt to guide layout decisions. It does not execute code or modify files. Use alongside design-alignment for element placement, design-whitespace for spacing decisions, and design-responsive-strategy for breakpoint behavior.

Success Criteria

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.