Files
pipelines/web/design/tokens/tokens.css
T
alan 607356702a web: comfortable phone density and clearer back control
Raise phone body/meta type, controls and dock targets to 44/56px, make the chat
back arrow a visible 44px control, and give the star/menu 44px hit areas without
covering the chat status. Keep the shipped skill free of personal device and
project capture paths.
2026-10-20 03:49:35 +01:00

280 lines
12 KiB
CSS

/* ===========================================================================
Pipelines web — visual system tokens
---------------------------------------------------------------------------
The single source of truth for colour roles, spacing, radii, type, elevation,
focus, tints and motion. Every token is named for the job it does, never for
the value it happens to hold.
This file contains custom properties only. Import it first, then a component
stylesheet (styleguide.css is the worked example). Nothing here paints a
selector on its own.
Contrast contract (verified against the surfaces below):
--color-text 16.17:1 on --color-bg, 15.29:1 on --color-surface
--color-muted 7.08:1 on --color-bg, 6.70:1 on --color-surface
--color-border 4.27:1 on --color-bg, 4.04:1 on --color-surface,
3.33:1 on --color-elevated-2 (component edges stay >=3:1)
--color-focus 10.59:1 on --color-bg, 10.01:1 on --color-surface
Run-status hues are the web's current values, unchanged.
=========================================================================== */
:root {
/* ---- Canvas and surface layers ---------------------------------------- */
/* bg the page behind every pane
surface a pane, card or transcript group
surface-2 an inset control, row or code body
elevated a menu, dialog, sheet or toast above the page
elevated-2 the highest drawn surface: hover on an elevated control */
--color-bg: #0a0a0b;
--color-surface: #121214;
--color-surface-2: #17171a;
--color-elevated: #1d1d21;
--color-elevated-2: #242429;
--color-scrim: rgba(0, 0, 0, 0.58);
/* ---- Lines and focus --------------------------------------------------- */
/* divider decorative separation inside one surface (not a control edge)
border the edge of an interactive or focusable component; >=3:1 on
bg, surface, surface-2 and elevated (use border-strong on
elevated-2)
border-strong selected / pressed emphasis; >=3:1
focus the one focus ring colour, visible on every surface */
--color-divider: #26262a;
--color-border: #74747c;
--color-border-strong: #9898a0;
--color-focus: #a8c0dc;
/* ---- Text -------------------------------------------------------------- */
--color-text: #e8e8ea;
--color-muted: #9a9aa2;
--color-faint: #85858d;
--color-on-accent: #081018;
--color-on-bad: #1b0b0b;
--opacity-disabled: 0.5;
/* ---- Accent ------------------------------------------------------------ */
--color-accent: #8fa8c8;
--color-accent-strong: #a8c0dc;
--color-accent-pressed: #758dad;
/* ---- Outcome hues (the app's own: ok / warn / bad) -------------------- */
--color-ok: #6bd39a;
--color-warn: #e6c268;
--color-bad: #ef8a8a;
/* ---- Run-status palette (the web's current values, unchanged) ---------- */
/* These are copied from the current base.css/.chip-* rules. Three values
(succeeded, failed, interrupted) are the web's tuned rendering; the Compose
RunStatusPalette uses slightly different stops. This item does not re-tune
any status hue. */
--status-queued: #9aa6a2;
--status-running: #7fb2f0;
--status-active: #7fb2f0;
--status-waiting: #8edff5;
--status-succeeded: #6bd39a;
--status-failed: #ef8a8a;
--status-canceled: #889391;
--status-interrupted: #e6c268;
--status-blocked: #f0a35e;
--status-skipped: #a8b8c8;
--status-unknown: #bec9c5;
/* Status washes tint the chip body; the neutral chip edge does the 3:1
boundary work, so a wash never has to carry the component alone. */
--status-queued-wash: rgba(154, 166, 162, 0.10);
--status-running-wash: rgba(127, 178, 240, 0.10);
--status-active-wash: rgba(127, 178, 240, 0.10);
--status-waiting-wash: rgba(142, 223, 245, 0.10);
--status-succeeded-wash: rgba(107, 211, 154, 0.10);
--status-failed-wash: rgba(239, 138, 138, 0.10);
--status-canceled-wash: rgba(136, 147, 145, 0.06);
--status-interrupted-wash: rgba(230, 194, 104, 0.10);
--status-blocked-wash: rgba(240, 163, 94, 0.10);
--status-skipped-wash: rgba(168, 184, 200, 0.10);
--status-unknown-wash: rgba(190, 201, 197, 0.10);
/* ---- Interaction tints ------------------------------------------------- */
/* A tint is a transparent wash laid over whatever surface is already there;
it never replaces a surface role. */
--tint-hover: rgba(232, 232, 234, 0.05);
--tint-pressed: rgba(232, 232, 234, 0.09);
--tint-selected: rgba(143, 168, 200, 0.14);
--tint-selected-strong: rgba(143, 168, 200, 0.22);
--tint-accent-soft: rgba(143, 168, 200, 0.10);
--tint-ok-soft: rgba(107, 211, 154, 0.10);
--tint-warn-soft: rgba(230, 194, 104, 0.10);
--tint-bad-soft: rgba(239, 138, 138, 0.10);
--tint-info-soft: rgba(142, 223, 245, 0.10);
/* ---- Spacing: 8px grid with 4px half-steps ----------------------------- */
/* 3xs is the only 2px step, reserved for optical alignment (a glyph against
a label), never for layout. */
--space-3xs: 2px;
--space-2xs: 4px;
--space-xs: 8px;
--space-s: 12px;
--space-m: 16px;
--space-l: 24px;
--space-xl: 32px;
--space-2xl: 40px;
--space-3xl: 48px;
--space-4xl: 64px;
/* Role aliases: use these in components, not the t-shirt scale. */
--space-inline-tight: var(--space-2xs); /* glyph + label */
--space-inline: var(--space-xs); /* buttons in a toolbar */
--space-inline-loose: var(--space-s); /* chips in a row */
--space-stack-tight: var(--space-2xs); /* title + meta */
--space-stack: var(--space-xs); /* lines inside a block */
--space-block: var(--space-m); /* block to block */
--space-section: var(--space-l); /* section to section */
--space-page: var(--space-xl); /* page / pane padding */
--space-field-gap: var(--space-xs); /* label to field */
--space-control-pad-inline: var(--space-s);
--space-control-pad-block: var(--space-2xs);
--space-row-pad-inline: var(--space-s);
--space-panel-pad: var(--space-m);
--space-pane-pad: var(--space-m);
/* ---- Density ----------------------------------------------------------- */
/* Density changes padding and control height, never type size, so a compact
list stays readable. Set data-density="compact" on a container. */
--density-row-pad-block: var(--space-s);
--density-row-pad-inline: var(--space-s);
--density-row-gap: var(--space-2xs);
--density-control-height: 36px;
--density-control-height-small: 30px;
--density-touch-target: 44px;
--density-touch-target-large: 48px;
/* ---- Radii ------------------------------------------------------------- */
--radius-xs: 4px; /* inline code */
--radius-s: 6px; /* tiny marker, count badge */
--radius-control: 8px; /* button, field, row, menu item */
--radius-card: 10px; /* pane, card, tile, transcript group */
--radius-sheet: 16px; /* dialog and sheet */
--radius-pill: 999px; /* chip, count pill, terminal node */
/* ---- Type -------------------------------------------------------------- */
--font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
/* Sizes: 11 / 12 / 13 / 14 / 16 / 20 / 24. Roles, not numbers, at call sites. */
--type-eyebrow: 600 11px/14px var(--font-sans);
--type-label: 600 11px/16px var(--font-sans);
--type-meta: 400 12px/16px var(--font-sans);
--type-body-small: 400 13px/18px var(--font-sans);
--type-body: 400 14px/20px var(--font-sans);
--type-title-small: 600 16px/22px var(--font-sans);
--type-title: 600 20px/26px var(--font-sans);
--type-display: 600 24px/30px var(--font-sans);
--type-code: 400 12px/18px var(--font-mono);
--type-code-small: 400 11px/16px var(--font-mono);
--weight-regular: 400;
--weight-medium: 500;
--weight-semibold: 600;
--tracking-eyebrow: 0.06em;
--tracking-tight: -0.01em;
/* ---- Elevation --------------------------------------------------------- */
/* Elevation is reserved for things that float above the page: a menu, a
dialog, a sheet, a toast. A pane or card never casts a shadow. */
--elevation-1: 0 1px 2px rgba(0, 0, 0, 0.32);
--elevation-2: 0 8px 24px rgba(0, 0, 0, 0.42);
--elevation-3: 0 18px 48px rgba(0, 0, 0, 0.52);
--elevation-sheet: 0 -16px 48px rgba(0, 0, 0, 0.55);
--elevation-menu: var(--elevation-2);
--elevation-dialog: var(--elevation-3);
--elevation-toast: var(--elevation-2);
/* ---- Focus ------------------------------------------------------------- */
--focus-ring-width: 2px;
--focus-ring-offset: 2px;
--focus-ring-color: var(--color-focus);
--focus-ring: 0 0 0 var(--focus-ring-width) var(--focus-ring-color);
--focus-ring-inset: inset 0 0 0 var(--focus-ring-width) var(--focus-ring-color);
--focus-halo: 0 0 0 var(--focus-ring-width) var(--color-bg),
0 0 0 calc(var(--focus-ring-width) + var(--focus-ring-offset)) var(--color-focus);
/* ---- Motion ------------------------------------------------------------ */
/* fast hover / press feedback
base selection, expansion, focus colour
slow dialog and sheet entry
spin an indeterminate spinner's one rotation */
--motion-instant: 80ms;
--motion-fast: 120ms;
--motion-base: 180ms;
--motion-slow: 240ms;
--motion-spin: 800ms;
--ease-standard: cubic-bezier(0.2, 0, 0, 1);
--ease-out: cubic-bezier(0, 0, 0, 1);
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
/* ---- Layout ------------------------------------------------------------ */
--layout-rail: 200px;
--layout-list-min: 200px;
--layout-list-max: 288px;
--layout-detail-min: 200px;
--layout-dock: 60px;
--layout-hairline: 1px;
--layout-measure: 72ch;
--layout-chat-measure: 560px;
--layout-dialog: 440px;
--layout-sheet: 560px;
--layout-menu: 240px;
--icon-status: 14px;
--icon-small: 16px;
--icon-inline: 18px;
--icon-list: 20px;
--icon-rail: 24px;
--layer-sticky: 10;
--layer-popover: 20;
--layer-dialog: 40;
--layer-toast: 50;
/* ---- Transitional aliases --------------------------------------------- */
/* The existing stylesheets use these short names. They map onto the roles
above so a file can be migrated one rule at a time; new CSS should use the
--color-* / --type-* / --space-* roles directly. */
--bg: var(--color-bg);
--surface: var(--color-surface);
--surface-2: var(--color-surface-2);
--elevated: var(--color-elevated);
--border: var(--color-border);
--border-strong: var(--color-border-strong);
--text: var(--color-text);
--muted: var(--color-muted);
--accent: var(--color-accent);
--ok: var(--color-ok);
--warn: var(--color-warn);
--bad: var(--color-bad);
}
/* Compact density is a scope, not a second theme: same colours, same type,
tighter row padding and a shorter control. */
[data-density="compact"] {
--density-row-pad-block: var(--space-xs);
--density-row-pad-inline: var(--space-s);
--density-row-gap: var(--space-3xs);
--density-control-height: 30px;
--density-control-height-small: 24px;
}
/* Phones get the comfortable density: a 44px control, slightly larger body
text and a 56px dock cell. Desktop keeps the denser 36px/14px scale. */
@media (max-width: 599px) {
:root {
--density-control-height: 44px;
--density-control-height-small: 40px;
--type-eyebrow: 600 12px/16px var(--font-sans);
--type-label: 600 12px/17px var(--font-sans);
--type-meta: 400 13px/18px var(--font-sans);
--type-body-small: 400 14px/20px var(--font-sans);
--type-body: 400 15px/21px var(--font-sans);
--type-title-small: 600 17px/23px var(--font-sans);
}
}