Skip to content

Design Tokens (Variables) ​

Digital Delve UI uses CSS custom properties defined at the beginning of the css library. Always try and use these variables before creating new values.

Brand & Intent Colors ​

Each intent color has a full scale: base, foreground (-fg), hint, hover, and active.

VariableValueDescription
--primary#0247fePrimary brand color
--accent#f66429Accent brand color (orange)
--success#059669Positive / success states
--warning#e1b12cCautionary / warning states
--danger#e84118Destructive / error states
--info#0097e6Informational states
--neutral#6b7280Secondary / generic actions

Color Scale ​

Each color also exposes derived tokens for foreground text, tinted backgrounds, and interactive states:

SuffixExamplePurpose
(base)--primaryFill color for backgrounds, borders, icons
-fg--primary-fgForeground text color on that fill (#fff)
-hint--primary-hintLightly tinted background (alerts, badges)
-hover--primary-hoverLightened fill on hover
-active--primary-activeDarkened fill on active/press
css
background: var(--success);
color: var(--success-fg);

/* Tinted background for an alert */
background: var(--danger-hint);
color: var(--danger);

Theme Variables ​

These tokens automatically switch between light and dark values. Use them for all UI surfaces, text, and borders.

VariableLightDarkDescription
--bg#f5f6fa#010101Page background
--surface#fff#1c1c1aCard and panel backgrounds
--surface-alt#f1f3f5#242424Alternate surface (hover rows, nested panels)
--border#e5e7eb#2a2a33Borders and dividers
--text#1a1a2e#f1f1f5Primary body text
--text-muted#666#9a9aa8Secondary / supporting text
--text-hint#9a9aa8#666Placeholder and hint text

Dark Mode ​

Dark mode is applied automatically via prefers-color-scheme: dark. It can also be forced by adding data-theme="dark" (or locked to light with data-theme="light") on the root element.

html
<html data-theme="dark">…</html>

Typography ​

VariableValueDescription
--fontsystem-ui, -apple-system, "Segoe UI", sans-serifBody and UI text
--font-header-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serifHeadings

See Base Styles for the heading size scale and body defaults.