Manual
Almnck.
Price: 50ⓐ

Expanding Margins Layout

Design decisions for the three-column margins layout, January 2026.

Problem

The original layout constrained everything to a fixed max-width: 80rem (later 43em on body), leaving empty whitespace on wide monitors while sidenotes remained cramped. On ultrawide displays, readers saw wasted space on either side of a narrow content column.

Goals

  1. Let sidenotes expand into available viewport space on wide screens
  2. Keep body text at a comfortable reading width
  3. Maintain breathing room between sidenotes and viewport edges
  4. Preserve the pamphlet aesthetic with the masthead border extending full-width

Solution

CSS Grid with Flexible Margins

.margins-layout {
    display: grid;
    grid-template-columns:
        minmax(14rem, 1fr)    /* left margin: min 14rem, grows with viewport */
        minmax(20rem, 37rem)  /* body: min 20rem, max 37rem */
        minmax(14rem, 1fr);   /* right margin: min 14rem, grows with viewport */
    gap: 2rem;
    width: 100%;
}

Body Constraint Override

When using the margins layout, the body’s default max-width: 43em is removed to allow full-width expansion:

body:has(.margins-layout) {
    max-width: none;
    padding-left: 3rem;
    padding-right: 3rem;
}

The 3rem padding ensures sidenotes don’t butt against viewport edges.

Design Values

Element Value Rationale
Body text max 37rem ~60-65 chars/line, classic book width
Margin minimum 14rem ~16em in sidenote font, ~30 chars/line
Margin maximum 1fr Grows equally on both sides
Edge padding 3rem Breathing room at viewport edges
Gap 2rem Separation between columns
Sidenote font 0.85rem Subordinate to body, still readable

Behavior

  • Narrow viewport (< ~70rem): Margins at minimum 14rem, body shrinks toward 20rem
  • Medium viewport (~70-80rem): Body at max 37rem, margins still at minimum
  • Wide viewport (> ~80rem): Body stays 37rem, margins grow into whitespace
  • Ultrawide: Sidenotes can become quite generous, masthead border spans full width

Outcome

Sidenotes now have room to breathe on wide displays while body text remains at comfortable reading width. The layout gracefully adapts from cramped laptops to ultrawide monitors.