| name | GravityGuard Design System | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| version | 1.0.0 | ||||||||||||||||||||||||||
| theme |
|
||||||||||||||||||||||||||
| typography |
|
||||||||||||||||||||||||||
| spacing |
|
||||||||||||||||||||||||||
| radii |
|
Single source of truth for the Live Monitor webview and every surface the extension owns. When code and this file disagree, this file wins until it is amended.
Calm instrument, not a dashboard.
GravityGuard sits inside the editor sidebar for hours. It must read like a precision instrument in a dim control room: dark slate canvas, thin borders, dense but breathable type, and colour used only as signal — never decoration.
Principles:
- Silence by default. Neutral surfaces carry the layout. Accent appears only on the one actionable element of the current view.
- Signal over ornament. Every hue maps to a state: cyan = active/info, green = pass, amber = pending/risk, red = violation, purple = knowledge. No hue without meaning.
- Density with rhythm. 11px body, 4px spacing scale, 8px section padding. Tight, but never touching — the sidebar is narrow, so vertical rhythm replaces horizontal air.
- Editor-native. Colours resolve through
--vscode-*variables first, with the palette above as fallback. The panel must never fight the user's theme. - Numbers are data. All counts, scores, durations and line references use
font-variant-numeric: tabular-numsso columns never jitter while streaming.
Atmospheric reference: a heads-up display at low brightness — legible at a glance, invisible when ignored.
| Token | Value | Use |
|---|---|---|
canvas |
#0b1120 |
Body background |
surface |
#111a2e |
Cards, panels, expanded rows |
surfaceHover |
#18233b |
Row and button hover |
borderSubtle |
#1f2a41 |
1px separators, card outlines |
Cards: 1px borderSubtle, radius.md, 8px padding, no shadow. Elevation is expressed by
border contrast, not blur.
- Titles: 13px / 600 /
textMain. - Body: 11px / 400 / 1.45 line-height.
- Labels and badges: 9–10px / 600 / uppercase tracking
0.04em/textMuted. - Rule IDs, diffs, paths:
mono, 8.5–10px. - Never more than three sizes in one card.
- Badge = pill, 9px,
radius.sm, backgroundcolor @ 20% alpha, textcolor. - Pass / fail / pending always pair colour with a word or icon — colour alone is not a label.
- Progress and score bars: 4px height,
radius.sm, tracksurface, fill = state colour.
- Height 24px, padding
0 10px,radius.sm, 10px label. - Default: transparent background,
borderSubtleborder,textMutedtext. - Hover:
surfaceHoverbackground,textMaintext. - Primary action:
primaryAccentborder and text at 15% background tint. - Destructive action:
dangeronly, never filled solid. - Focus: 1px
primaryAccentoutline, offset 2px. Never remove focus rings.
- 10px labels, 6px vertical padding, bottom 2px underline in
primaryAccentwhen active. - Inactive tabs are
textMuted; counts render as badges, not parenthetical text.
- Row height 26px minimum, 6px horizontal padding, separators
borderSubtleonly. - Numeric columns right-aligned with tabular figures.
- Truncate long rule IDs and paths with ellipsis; expose full text via
title.
- 120ms
ease-outfor hover, tab and expand transitions. - No entrance animations, no spinners longer than 400ms without text.
- Respect
prefers-reduced-motion: collapse all transitions to 0ms.
Do
- Resolve colour through
--vscode-*first, palette second. - Keep one primary action per view.
- Pair every colour signal with text or an icon.
- Use the 4px scale for every margin, gap and padding.
- Verify contrast at
textMutedonsurface(≥ 4.5:1) before shipping new text. - Reuse
styles/base.tstokens; add new sections undersrc/webview/styles/.
Don't
- Don't introduce a new hex value outside this palette without amending this file.
- Don't use gradients, glow, drop shadows, or rounded corners above
radius.lg. - Don't fill destructive buttons or use red for anything but a real violation.
- Don't animate layout properties (
width,height,top) — transform and opacity only. - Don't render raw JSON, stack traces or YAML in the default view; summarise and expand.
- Don't hardcode font sizes below 8px or above 18px in the sidebar.
- Don't add a second accent colour to a single card to create hierarchy — use weight and spacing.