Skip to content

Design tokens stable

Silo's visual surface is a set of CSS custom properties — design tokens — all namespaced --silo-*. They track the active theme through the cascade, so styling against them gives you light/dark support, custom themes, and Cmd/Ctrl +/-/0 font scaling for free. This page is the stable, public token surface; Styling your extension is the how-to.

There's only one question that matters for your CSS: may an extension consume this token in its own styles? Tokens fall into three groups by the answer.

Authoring a theme rather than an extension? A theme may recolor every token here, component tokens included — this page only lists the extension-consumable subset. See Building a theme for the complete overridable surface.

GroupPatternConsume in your extension?
Design tokens--silo-color-*, --silo-font*, --silo-radius-*, --silo-button-*✅ Yes — this page
Component tokens--silo-content-*, --silo-statusbar-*, --silo-breadcrumb-*, --silo-tab-*, --silo-menu-*❌ No — host chrome you don't own
Internal tokens--silo-internal-*❌ No — host plumbing, may change

Consuming a component or internal token from an extension package (packages/extensions-*/src/**) is a lint error (silo/extension-design-tokens-only) — the CSS analog of importing app internals instead of going through ctx. The reasoning is recorded in ADR 0017.

The tokens you use

Colors

Semantic, never literal (there is no --silo-color-blue). Every one is also a ThemeVars key, so a theme can recolor it.

TokenRole
--silo-color-bgApp / panel background
--silo-color-bg-hoverHover surface (rows, menu items, cards)
--silo-color-bg-activeActive/pressed surface
--silo-color-textBody text
--silo-color-text-hiHigh-emphasis text (headings, active)
--silo-color-text-loLow-emphasis text (hints, disabled)
--silo-color-accentAccent (links, focus, selection)
--silo-color-accent-2Secondary accent
--silo-color-borderDefault border (often transparent)
--silo-color-border-strongVisible divider / outline
--silo-color-okSuccess
--silo-color-warnWarning
--silo-color-errError / destructive
--silo-color-input-bgForm-field background
--silo-color-input-textForm-field text
--silo-color-button-bgNeutral control surface
--silo-color-button-textNeutral control text

Fonts

TokenRole
--silo-font-uiUI font stack (sans)
--silo-font-monoMonospace stack (code, terminals)

Font sizes

One absolute source (--silo-font-size-base, driven by the user's uiFontSize); the rest derive from it. Don't hard-code px — size relatively (see the sizing rule).

TokenValue
--silo-font-size-baseThe app base (live)
--silo-font-size-smbase − 1px
--silo-font-size-chromebase − 2px (chrome)

Radius

A fixed scale for incidental corners (not theme-overridable — theming a corner is done per-treatment, like the button group below).

TokenValue
--silo-radius-sm4px
--silo-radius-md6px

Buttons

A treatment group so a theme can restyle buttons without moving the global accent. The global button / .silo-button / .silo-button-primary / .silo-button-danger classes already consume these — use the classes; reach for the raw tokens only for a bespoke control. Hover is derived (a darker color-mix of the fill), not a token.

TokenRole
--silo-button-bg / -text / -borderNeutral button
--silo-button-primary-bg / -primary-textPrimary action
--silo-button-danger-bg / -danger-textDestructive action

What you don't touch

  • Component tokens (--silo-statusbar-bg, --silo-content-tab-bg, …) style host chrome you don't render. Coupling your panel to them is the CSS version of importing state/. If you genuinely need to match a chrome surface, that's a request to promote it to a design token, not a reason to reach for it.
  • Internal tokens (--silo-internal-*) are host plumbing with no stability promise. The panel-derived font sizes are applied to your panel's slot wrapper and you inherit them — never name them (see the sizing rule).
  • Hard-coded colors, font families, or px font sizes break theming and accessibility scaling.

See also