Responsive Layout System & Grid

Breakpoints

Defined in packages/web-tailwind/partials/grid.css as @theme CSS custom properties:

BreakpointValuerem
sm640px40rem
md768px48rem
lg1024px64rem
xl1280px80rem
2xl1440px90rem
3xl2100px131.25rem

All breakpoints are mobile-first — styles apply at the named breakpoint and up.


Core Layout Utilities

container

Full-width fluid wrapper that transitions to a fixed-width centered layout at larger breakpoints. Overrides Tailwind's default container. This is what powers our layout most of the time - it assures all containers break at the same place.

BreakpointWidthHorizontal Padding
Mobile (default)100%24px
sm (640px+)100%32px
md (768px+)100%40px
lg (1024px+)100%64px
xl (1280px+)1152px fixed, centered0
2xl (1440px+)1248px fixed, centered0

The switch from fluid to fixed at xl uses margin-inline: auto and drops horizontal padding entirely — the fixed width provides the visual margin.

grid-container

CSS grid that increases column count as the viewport grows. Uses minmax(0, 1fr) columns to prevent overflow.

Note: This class does not constrain the element's width - it will always stretch to the width of its parent.

BreakpointColumnsGap
Mobile (default)41rem (16px)
sm (640px+)81rem (16px)
md (768px+)81.5rem (24px)
lg (1024px+)121.5rem (24px)

Section Component

packages/web-ui/components/Sections/Section.tsx

The primary semantic layout wrapper for all page sections. Handles:

  • Renders a <section> tag (or <header> when isHeader={true})
  • Applies py-12 md:py-16 vertical padding (48px mobile → 64px desktop)
  • Wraps children in .container by default (hasContainer prop, default: true)
  • Optional dark/light color modes, background images, gradient backgrounds, and baton stroke decorations

Props

PropTypeDefaultDescription
childrenReactNodePage content
classNamestringAdditional classes
hasContainerbooleantrueWraps content in .container
idstringSection ID for deep linking
isHeaderbooleanfalseRenders <header> instead of <section>
backgroundImagestringURL to a background image
batonFadeColor'light' | 'dark'Fade color for baton stroke animations
batonStrokeAnimationBatonStrokeProps | nullAnimated decorative strokes
gradientBackgroundstringCSS class name for gradient

Typical Page Layout Hierarchy

<Section>
  {/* container applied automatically by Section */}
  <div className='grid-container'>
    <div className='col-span-4 lg:col-span-8 lg:col-start-3'>
      {/* Centered content */}
    </div>
  </div>
</Section>
Section                        ← semantic <section> + py-12/py-16 + .container
  └── .grid-container          ← 4 → 8 → 12 column CSS grid
        └── .col-span-X        ← grid item spanning X columns
              └── child content

Common Column Patterns

Full-width row

<div className='col-span-4 sm:col-span-8 lg:col-span-12'>

Centered narrow block (8 of 12 columns)

<div className='col-span-4 lg:col-span-8 lg:col-start-3'>
  {/* col-start-3 offsets 2 columns on each side (2 + 8 + 2 = 12) */}

Centered medium block (10 of 12 columns)

<div className='col-span-4 lg:col-span-10 lg:col-start-2'>
  {/* 1 column margin on each side */}

Two-column split (1/3 + 2/3)

<div className='col-span-4 lg:col-span-4'>{/* Content */}</div>
<div className='col-span-4 lg:col-span-8'>{/* Image */}</div>

Two-column split (5:6 ratio, right-anchored)

<div className='col-span-12 lg:col-span-5'>{/* Tabs list */}</div>
<div className='col-span-12 lg:col-span-6 lg:col-end-13'>{/* Tab panels */}</div>

Mobile Stacking

Components default to full-width at mobile (col-span-4) and expand to their intended column spans at lg:

{/* Stacks on mobile, side-by-side at lg */}
<div className='col-span-4 lg:col-span-6'>Left</div>
<div className='col-span-4 lg:col-span-6'>Right</div>

For flex-based stacking before the grid kicks in:

{/* Flex stack on mobile, grid on md+ */}
<div className='flex flex-col gap-12 md:grid md:grid-container'>

Source Files

FilePurpose
packages/web-tailwind/partials/grid.cssBreakpoints, container, and grid-container definitions
packages/web-tailwind/theme.cssCSS entry point that imports all partials
packages/web-ui/components/Sections/Section.tsxSection layout primitive
packages/web-tailwind/partials/tokens.cssSemantic color/text/bg/border tokens
packages/web-tailwind/partials/components.cssButton, input, link, and other component utilities