Skip to content
Fleetline

Grid

Usage

Use Grid for two-dimensional layout: dashboards, vehicle card lists, form columns. Use Container once per page to cap line length and center the content column.

Anatomy

  1. Grid — .grid (12 equal tracks) or .grid--auto-fit
  2. Item span — .col-span-N and .col-span-{sm|md|lg|xl}-N
  3. Gap — --grid-gap (default --space-4)
  4. Container — .container, max width --size-container-xl, growing gutters

Examples

Grid

12
6
6
4
4
4
3
9

Van KX-219

In workshop · Bay 4

Truck HT-507

On route · Riverside

Van KX-344

Available · North Yard

Pickup PU-118

Service due in 3 days

Work order WO-4182

Full width on phones, 8 of 12 from 48rem, 9 of 12 from 64rem.

Vehicle details

Side panel

<div class="grid">
  <div class="col-span-6">…</div><div class="col-span-6">…</div>
</div>

<!-- Repeating items: no breakpoints needed -->
<ul class="grid grid--auto-fit" style="--grid-min: 12rem" role="list">…</ul>

<!-- Responsive spans: full width by default -->
<div class="grid">
  <div class="col-span-md-8 col-span-lg-9">…</div>
  <div class="col-span-md-4 col-span-lg-3">…</div>
</div>

Container

Settings

Centered column, max 48rem (.container--md) with a 16px gutter that grows to 24px and 32px on wider screens.

<main class="container">…</main>          <!-- max 80rem -->
<main class="container container--md">…</main> <!-- forms and settings, max 48rem -->

API

HookValuesPurpose
.gridblock class12 equal columns; children span 12 by default
.col-span-{1|2|3|4|6|8|9|12}classSpan at every width
.col-span-sm-{4|6|12}, -md-{3|4|6|8}, -lg-{3|4|8|9}, -xl-{2|3}classSpan from 40 / 48 / 64 / 80rem (mirrors --breakpoint-*)
.grid--auto-fitmodifier classAs many columns as fit, each ≥ --grid-min
--grid-gap, --grid-mincustom propertyGap token; track minimum (default 16rem)
.container, .container--md | --lgblock / modifierCentered page column, 80 / 48 / 64rem max

Do and don't

Vehicle cards in .grid--auto-fit with --grid-min: 14rem.

Do let repeating content fit itself; it works in any slot width.

.col-span-3 on cards with no responsive span.

Don't use fixed small spans without a mobile default — four columns at 320px are unreadable.

Accessibility

Tokens

Custom propertyPurpose
--space-4 (gap), --space-4 | -6 | -8 (container gutters)Spacing
--size-container-md | -lg | -xlContainer widths
--breakpoint-sm | -md | -lg | -xlMirrored as literal rem in media queries