Skip to content

Apply the SignalWire design system; support dark, light, and auto themes - #306

Merged
briankwest merged 4 commits into
mainfrom
docs/signalwire-design-system
Jul 24, 2026
Merged

Apply the SignalWire design system; support dark, light, and auto themes#306
briankwest merged 4 commits into
mainfrom
docs/signalwire-design-system

Conversation

@briankwest

Copy link
Copy Markdown
Collaborator

Summary

Restyles the site to follow the SignalWire style guide / Design System v2.0, replacing the previous ad-hoc palette (#254592 primary, Inter + Neue Einstellung). Values come from the DTCG token set (brand / dark / light layers).

src/css/custom.scss — rewritten in three layers

  1. SignalWire tokens--sw-* brand (blue #044EF4, fuchsia #F72A72, purple, turquoise, gold), plus the full light and dark surface/foreground/border scales.
  2. Infima mapping — those tokens mapped onto --ifm-* so the whole theme derives from the token set.
  3. Component rules
    • Headings: Instrument Sans 700, tight tracking, always neutral (never colored), per the 60‑30‑10 rule.
    • Body: Lexend, 1.7 line-height, 75ch prose measure. Code: JetBrains Mono.
    • Links: turquoise→fuchsia (dark), blue→fuchsia (light).
    • Tables: fuchsia header rule; blue header fill in light mode; raised-surface row hover.
    • Admonitions: info blue / warning gold / danger fuchsia / success green as a left accent only (no hard colored borders).
    • Cards: raised surface + depth shadow, fuchsia glow on hover.
    • Blue focus rings, 48px touch targets on mobile, subtle navbar border.

docusaurus.config.js

  • Dark / light / auto: defaultMode: "dark" (the system is dark-mode-first), switch enabled, and respectPrefersColorScheme: true so the initial theme follows the OS. The navbar toggle reports "currently system mode" until the visitor picks one.
  • Code blocks stay dark in both themes (terminal aesthetic): a custom SignalWire Prism theme is used for both theme and darkTheme, with the DTCG syntax colors (string turquoise, keyword #6e9eff, operator gold, number/type #ff6da0, comment #898995) on #1e1e1f.
  • Google Fonts (Instrument Sans / Lexend / JetBrains Mono) with preconnect.

Verification

npm run build passes. Verified in the built CSS that both token scales emit (--bg-page:#fafbfc light / #0e0e18 dark, --fg-headings:#070c2d / #f0f0f4), code blocks force --cb-bg:#1e1e1f in both themes, the fuchsia table rule and admonition accents are present, and the color-mode toggle renders in system mode.

Note: the default theme is now dark (per the guide's dark-mode-first principle). One-line change in colorMode if you'd rather keep light as the default.

🤖 Generated with Claude Code

Restyle the site against SignalWire Design System v2.0 (DTCG tokens) instead of
the previous ad-hoc palette (#254592 primary, Inter/Neue Einstellung).

src/css/custom.scss — rewritten in three layers:
- SignalWire tokens (--sw-*, --bg-*, --fg-*, --border-*, --cb-*) for both the
  light and dark surface/foreground scales.
- Mapping of those tokens onto Infima's --ifm-* variables.
- Component rules: headings (Instrument Sans, 700, neutral — never colored),
  body (Lexend, 1.7), code (JetBrains Mono), tables (fuchsia header rule; blue
  header in light), admonitions (info blue / warning gold / danger fuchsia /
  success green as a left accent, no hard colored borders), navbar, sidebar,
  TOC, cards (raised surface + depth, fuchsia glow on hover), buttons, blue
  focus rings, and 48px touch targets on mobile.

docusaurus.config.js:
- colorMode: dark default (the system is dark-mode-first), switch enabled, and
  respectPrefersColorScheme so the initial theme follows the OS — dark, light,
  and auto are all supported.
- Custom SignalWire Prism theme used for BOTH theme and darkTheme, so code
  blocks stay dark in both site themes per the design system, with the DTCG
  syntax token colors.
- Google Fonts (Instrument Sans / Lexend / JetBrains Mono) with preconnect.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@briankwest
briankwest requested a review from a team as a code owner July 24, 2026 18:33
briankwest and others added 3 commits July 24, 2026 13:43
The navbar logo is a single-color navy mark (#1b336f) that is unreadable on the
dark surface. Add a white variant (same geometry, artwork fill swapped to
#ffffff) and wire it as the navbar srcDark so Docusaurus swaps it with the theme.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the sparse three-column footer (Video / Community / More) with the
signalwire.com layout: a brand column (white logo, tagline, note) followed by
five link columns - Documentation, Reference, Downloads, Community, SignalWire.

Styling: always renders on the dark surface (#0e0e18) in both themes, with
Instrument Sans column headings, muted 15px links that brighten on hover,
generous column spacing, and a subtle purple radial glow along the top edge.
The brand column's heading is screen-reader-only so the logo carries the
identity visually, matching the reference.

All internal links verified to resolve.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The footer was hardcoded to the dark surface and was too airy - at six columns
it wrapped onto a second row and the type was oversized.

- Theme-aware: colors now resolve from the active token set (surface, headings,
  muted text, border), with a dark-mode override that drops the footer to the
  page surface and strengthens the top glow. The brand logo swaps too: navy
  mark on light, white mark on dark.
- Compact: 14px links and headings, tighter gaps (1.5rem/2rem), reduced padding,
  narrower brand column, and flex sizing so all six columns fit one row.
- Hide external-link glyphs in the footer; they forced awkward wraps and the
  reference design omits them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@briankwest
briankwest merged commit c542457 into main Jul 24, 2026
1 check passed
@briankwest
briankwest deleted the docs/signalwire-design-system branch July 24, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant