Skip to main content

Design system

Three surfaces share one stylesheet of design tokens, design/prototest-tokens.css: the ProtoTrace viewer, the HTML report and these docs. There are no copies.

SurfaceHow it gets the tokens
ProtoTrace viewerimports the file directly
HTML report sinkembeds the file into every report it writes
Documentationimports the file at the top of its theme

Every swatch on this page is drawn from that file, so this page is also a live check that the tokens render the way this page describes them.

Two surfaces​

The same tokens resolve differently on two surfaces, chosen with data-theme on <html>:

  • Technical paper, the light surface. It is the default for these docs.
  • Execution blueprint, the dark surface. It is the default for the viewer and the report.

Switch the theme of this site to see the blueprint values.

--bg
--surface
--surface-2
--hover
--surface-sunken

Colour carries meaning only:

--blueprint
--success
--warning
--danger
--violet
--muted

Documentation panels​

A panel's role determines its presentation. The shared frame supplies its border, header spacing and source line.

RolePresentation
Explanatory figureFollows the reader's theme; uses the document's reading scale for notes and explanations
CodeUses the sunken blueprint surface, the monospace scale and a shared copy control
Recorded product previewRetains the viewer's blueprint surface and compact row layout; names its source archive

Documentation prose uses the reader scale (1rem). The compact token scale remains appropriate for code, ids and authentic product controls. Headings, spacing, colours and radii continue to come from the existing tokens.

The execution vocabulary​

These tokens describe a test run rather than a page. Anything that draws a ProtoTest execution uses them, so a phase, an outcome or an entry kind looks the same everywhere. The samples below sit on the blueprint surface, where the viewer and the report draw them.

Phases​

Each test runs through up to four phases, in this order:

SetupExecutionRollbackTeardown

Outcomes​

An outcome is always a dot and a word, never colour alone:

SucceededPartialFailedCancelledSkipped

Entry types​

Each trace entry belongs to one of four families. The chip's label names the specific kind; the colour only separates the families.

ActionWhat the test did
CallDatayour own kinds
EvidenceWhat it proved or produced
CheckObservationArtifact
VerdictWhat it decided
FindingGate
FrameworkThe machinery that carried it
PhaseExtensionClientContextAuthOwnership

An unknown entry kind, such as your own billing.webhook.deliver operation, renders as an action. It looks like a built-in call, so your integration's operations are as visible as ProtoTest's.

Typography​

FaceUsed for
Space GroteskHeadings and the wordmark
ManropeEverything a person reads
JetBrains MonoData: durations, ids, kinds, routes, attribute values, code
Display--text-display
Heading--text-heading
Title--text-title
Strong--text-strong
Body--text-body
Meta--text-meta
Micro--text-micro

Nothing is set below 10px.

Spacing, radii and motion​

Padding, gaps and margins use the scale, never raw pixels. The only exception is a hairline of 1 or 2px.

TokenValueUsed for
--space-14pxthe gap inside a chip
--space-26pxbetween a label and its value
--space-38pxinside a control
--space-412pxbetween rows in a list
--space-516pxinside a panel
--space-622pxbetween a panel's sections
--space-732pxbetween page sections

A radius names what a thing is, so pick by role:

TokenValueUsed for
--radius-hairline2pxsmall markers and bars
--radius-chip4pxchips
--radius-control7pxbuttons and inputs
--radius-panel10pxpanels
--radius-overlay14pxdialogs and sheets
--radius-pill999pxfilter chips
  • Elevation: a single shadow, --elevation-overlay, used only by things that float. Panels have a border and no shadow.
  • Motion: --motion-fast for state changes, --motion-slow for layout changes. Both drop to zero when the reader asks the operating system to reduce motion.

The mark​

There is one mark geometry, and it is never redrawn or simplified. The surface decides its colours through --brand-mark-body and --brand-mark-check, so pages that inline the SVG get the right mark on either theme without swapping files.

ProtoTest mark on paper
Technical paper: navy and blueprint blue
ProtoTest mark on the blueprint
Execution blueprint: paper and cyan

A favicon is an image, so it can't read the page's theme. The viewer's and the report's favicons carry their own prefers-color-scheme rule and follow the operating system instead.

Using the tokens yourself​

If you write your own report sink or render trace data somewhere else, start from the same file rather than copying colours out of it. This is a complete document:

<!doctype html>
<html lang="en" data-theme="dark">
<head>
<link rel="stylesheet" href="prototest-tokens.css" />
</head>
<body>
<span class="outcome" style="color: var(--outcome-failed)">Failed</span>
<i style="background: var(--phase-execution)"></i>
</body>
</html>

Embed the file's contents instead of linking it when the output has to stand alone, which is what the HTML report sink does.

The viewer enforces this with a style lint that runs in its build. It rejects raw colours, spacing off the scale, and radii that are not tokens. The HTML report's tests check that it embeds the shared file rather than a palette of its own.