Skip to content
Tetrifox

Foundations

Layout & grid.

Every Tetrifox screen begins with the same constraints: close the frame, quantize the space, assemble from cells. Layout is not decoration around content — it is the system the interface grows from.

Unassembled: an open edge and unresolved spacing.

01 / Structure

The closed grid.

Close every edge. Each region has one border owner.

State 1 / 4. One wrapping frame closes the outside; gap-px bg-border supplies the internal hairlines.

One frame owner

The section closes the region; its cells only contribute the dividers between neighbours.

Floating edge

Open on two sides, so the structure never resolves.

The rules

  • Must

    Close every edge. Each line meets a neighbour or the frame; build divided layouts from Section, Cell and GridRow, not ad-hoc grid gap-* or flexbox.

  • Must not

    Add a second outer border border-border to a specimen inside an already-framed region. Continue the matrix with gap-px bg-border, or separate parts with only the border-t / border-l they need.

    --border

  • Must

    Keep borders structural: 1px hairlines in --border or --border-subtle.

    --border--border-subtle

  • Prefer

    Reserve self-contained micro-frames for small teaching diagrams whose border is the lesson: Layout specimens, Logo clearspace and incorrect-use examples, compact Mino diagrams.

02 / Rhythm

Spacing lattice.

Quantize every measure: a 4px base, an 8px rhythm, nine legal steps.

State 2 / 4 · measured

The same cells now inherit a controlled rail instead of arbitrary inset.

The nine legal steps

14pxMicro-gap
28pxStack gap
312pxCompact control
416pxMobile cell inset
624pxContent rail
832pxGroup gap
1248pxDesktop rail
1664pxSection rhythm
2496pxGenerous section
Content rail24 → 32 → 48Primary content aligns at px-6, md:px-8, and lg:px-12.
Cellstandard / sectionSemantic padding modes keep inset and vertical rhythm consistent.
Rhythm8 / 32 / 64→96Stack gap, group gap, and section spacing.

The rules

  • Must

    Use only the nine lattice steps — Tailwind 1, 2, 3, 4, 6, 8, 12, 16, 24 (4 to 96px) — for padding, margin and gaps.

  • Must not

    Use the .5 half-steps: p-1.5 (6px), gap-2.5 (10px), py-3.5 (14px).

  • Must

    Align primary text, captions, labels, tables, controls, Header and Footer to the content rail px-6 md:px-8 lg:px-12 (24 → 32 → 48px). The compact navigation Rail is the one exception.

  • Must

    Use Cell padding="standard" or padding="section" and do not add competing p-* or px-* classes to a padded Cell. padding="none" is for full-bleed visuals.

  • Prefer

    Use gap-2 between stacked items, gap-8 between groups, and py-16 md:py-24 for section rhythm.

03 / Frame

Frame & containers.

Let the viewport be the frame, and cap the measure inside the cell.

State 3 / 4 · full-bleed shell

Header, Rail, main, and Footer meet the viewport frame. The text measure remains capped inside main.

Legacy container · do not use

max-w-7xl

Outer gutters make the border float. Keep the frame full-bleed and cap only the content that needs a readable line length.

The rules

  • Must

    Let the viewport be the frame: no outer gutters and no centred max-w-* mx-auto column around the interface.

  • Must

    Cap reading measures inside content (max-w-md, max-w-xl, max-w-3xl) for readability on wide screens.

  • Must

    Pin the Rail (w-64, border-r) to the left edge, span a sticky Header (border-b) and a Footer (border-t) full width, and let <main> fill the rest. No border above the header or below the footer.

04 / Assembly

Cellular primitives.

Change the viewport below to see the same rules recompose without changing vocabulary.

State 4 / 4 · responsive assembly

1280px. The Rail joins the frame and row dividers move to the left.

The specimen represents each target mode inside the available width; it does not force a literal 1280px canvas.
<Section>border-bA full-bleed band. Stack sections to continue the vertical lattice.
<Cell>24 / 32 / 48The canonical content rail; borders stay with the parent.
<GridRow>border-t → border-lOne responsive divider changes orientation when the cells form a row.
<StatusMark>gap / draft / shippedA square state marker: hollow, muted, or brand-filled.
gap
draft
shipped

Constraints this explicit let an interface grow without visual drift. Three primitives, one square mark, nine spacing steps. This page is assembled from exactly that set—nothing here is decoration.

The rules

  • Must

    Assemble from three primitives: Section (a full-bleed band with a bottom hairline), Cell (padding, no borders) and GridRow (one divider that stacks as border-t and becomes border-l in a row).

  • Must

    Draw status markers as squares, never circles: hollow for gap, muted fill for draft, brand fill for shipped.