Layout and Grid

Eleven proven layout systems side by side, so each product can pick the rules that fit it: breakpoints, columns, gutters, margins, and spacing. Every system runs through the same Prism layout patterns, and every one holds from a 320 pixel phone to a wide screen. Plus dashboards, print, and email.

Every demo below follows the chosen system. Each system is credited and its numbers come from its own published docs.

Prism

Prism

Prism's defaults: a 4 pixel base, 4, 8, then 12 columns, gutters and margins that grow with the screen, and a 1200 pixel page.

Made by
Prism DSX
Base unit
4 px
Breakpoints
4
Most columns
12
Widest content
1200 px
License
Prism's own
  • Parts respond to their own width first (container queries), so these breakpoints are for page structure only.

Sources: Prism tokens (opens a new tab)

Breakpoints

The screen widths where a system changes its layout, drawn from 0 to 1920 pixels. Prism's rule still applies on top: a part responds to its own width first.

Column grid

Drag the width to see where the columns, gutters, and margins land.

Prism

At 1024 pixels, Prism is at large: 12 columns, 24 pixel gutters, 32 pixel margins.

Spacing scale

Small gaps join related things; big gaps separate sections. Pick from the scale, never in between.

Prism

  • 4
  • 8
  • 12
  • 16
  • 24
  • 32
  • 48
  • 64

All systems at a glance

All layout systems compared
SystemBreakpointsColumnsGuttersWidest contentBase unit
Prism0, 640, 1024, 14404, 8, 1216, 24, 3212004 px
IBM Carbon320, 672, 1056, 1312, 15844, 8, 163215848 px
Material 30, 600, 840, 1200, 1600None24Not set8 dp
Bootstrap 50, 576, 768, 992, 1200, 14001224132016 px
Tailwind CSS0, 640, 768, 1024, 1280, 1536NoneNot setNot set4 px
GOV.UK320, 641, 769None309605 px
Apple HIGSize classes, no fixed widthsNoneNot setNot setNone stated
Atlassian320, 480, 768, 1024, 1440, 17682, 6, 1212, 1612968 px
Shopify Polaris0, 490, 768, 1040, 14406, 12169984 px
Microsoft Fluent 2320, 480, 640, 1024, 1366, 1920NoneNot setNot set4 px
Ant Design0, 576, 768, 992, 1200, 1600240Not set4 px

Numbers in pixels unless the system works in points (Apple) or density independent pixels (Material), which match pixels at standard density.

Layout patterns

The same patterns work with any system. The gap comes from Prism's spacing scale. Narrow the space to see each one adapt with no breakpoints.

Dashboard layout

A header on top, navigation on the side, and a grid of cards. When the space is under 56rem the navigation moves under the header.

Studio dashboard
Visitors
Orders
Revenue
Refunds

ReadyAny website, Shopify, WordPress, Square, plain hosting

<!-- Dashboard shell: header on top, navigation on the side, main area.
     Under 56rem the navigation moves below the header. It reads its own width. -->
<div class="prism-shell-wrap">
  <div class="prism-shell">
    <header class="prism-shell__head">App name</header>
    <nav class="prism-shell__nav" aria-label="Main">…</nav>
    <main class="prism-shell__main">
      <div class="prism-auto-grid" style="--prism-min: 14rem">…metric cards…</div>
    </main>
  </div>
</div>

Print

When someone prints, navigation and buttons drop away, text turns black on white, links are written out, and cards and tables are never split across pages.

Proposal: a new website

Scope, timeline, and price, as agreed on our call. Questions? See the FAQ.

ReadyIn layout.css already

/* Already in layout.css. Mark anything screen only with class="prism-no-print". */
@media print {
  @page { margin: 18mm 16mm; }
  .prism-no-print, nav, button { display: none !important; }
  body { color: #000; background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; }   /* links written out on paper */
  .prism-card, .prism-table-wrap, figure, tr, img { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
}

Email

Email apps are not browsers: many, Outlook especially, ignore grid and flex. So email layouts use tables and inline styles, stay 600 pixels wide at most, become one column on phones, and keep real text instead of text in pictures.

ReadyAny email tool that accepts custom HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<title>Your order is on its way</title>
<style>
  @media (max-width: 620px) {
    .col { display: block !important; width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; }
    .pad { padding: 20px !important; }
  }
</style>
</head>
<body style="margin:0; padding:0; background:#F4F4F5;">
  <div style="display:none; max-height:0; overflow:hidden;">Your order ships today. Here is what to expect.</div>
  <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:#F4F4F5;">
    <tr>
      <td align="center" style="padding:24px 12px;">
        <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="max-width:600px; background:#FFFFFF; border-radius:12px;">
          <tr>
            <td class="pad" style="padding:32px; font:16px/1.6 Arial, Helvetica, sans-serif; color:#18181B;">
              <h1 style="margin:0 0 12px; font:700 24px/1.25 Georgia, serif;">Your order is on its way</h1>
              <p style="margin:0 0 20px;">Thanks for shopping with us. It should arrive in 3 to 5 days.</p>
              <table role="presentation" width="100%" cellpadding="0" cellspacing="0">
                <tr>
                  <td class="col" width="50%" valign="top" style="padding:0 8px 16px 0;">
                    <strong>Order</strong><br>Number 20481
                  </td>
                  <td class="col" width="50%" valign="top" style="padding:0 0 16px 8px;">
                    <strong>Ships to</strong><br>12 Harbor Lane
                  </td>
                </tr>
              </table>
              <table role="presentation" cellpadding="0" cellspacing="0">
                <tr>
                  <td style="border-radius:8px; background:#18181B;">
                    <a href="https://example.com/track" style="display:inline-block; padding:14px 22px; font:600 16px Arial, sans-serif; color:#FFFFFF; text-decoration:none;">Track your order</a>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
        <p style="margin:16px 0 0; font:13px/1.5 Arial, sans-serif; color:#52525B;">You get this email because you placed an order. <a href="https://example.com/settings" style="color:#18181B;">Email settings</a></p>
      </td>
    </tr>
  </table>
</body>
</html>

Take Prism home

The chosen system as CSS variables and a column grid with its own breakpoints, or as design tokens.

ReadyAny website, Shopify, WordPress, Square, plain hosting

/* Prism. Values from /rooms/core-tokens/ */
:root {
  --layout-space-1: 4px;
  --layout-space-2: 8px;
  --layout-space-3: 12px;
  --layout-space-4: 16px;
  --layout-space-5: 24px;
  --layout-space-6: 32px;
  --layout-space-7: 48px;
  --layout-space-8: 64px;
  --prism-max: 1200px;
}

/* Breakpoints: small 0, medium 640, large 1024, wide 1440 */
.prism-page, .prism-container { --prism-margin: 16px; }
.prism-grid { --prism-columns: 4; --_g: 16px; }
@media (min-width: 640px) { .prism-page, .prism-container { --prism-margin: 24px; } }
@container prism-grid (min-width: 640px) { .prism-grid { --prism-columns: 8; --_g: 24px; } }
@media (min-width: 1024px) { .prism-page, .prism-container { --prism-margin: 32px; } }
@container prism-grid (min-width: 1024px) { .prism-grid { --prism-columns: 12; --_g: 24px; } }
@media (min-width: 1440px) { .prism-page, .prism-container { --prism-margin: 32px; } }
@container prism-grid (min-width: 1440px) { .prism-grid { --prism-columns: 12; --_g: 32px; } }