Skip to content

docs(gamut-docs): move the docs site onto the color system - #67

Draft
dreamwasp wants to merge 17 commits into
cass-gmt-1825-color-behaviorfrom
cass-gmt-1825-color-site
Draft

dreamwasp wants to merge 17 commits into
cass-gmt-1825-color-behaviorfrom
cass-gmt-1825-color-site

Conversation

@dreamwasp

@dreamwasp dreamwasp commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Moves the rest of the gamut-docs site onto the generated color system. #59 added the Color system page; the older pages still described the old aliases (text, background, primary), the Core theme and palette names like navy and beige. This is the last PR in the color stack.

Pages rewritten

  • concepts/color-modes.md: roles instead of aliases, modes as data-color-mode attributes, and how a brand and a mode combine.
  • foundations/themes.md: the five brand themes, skillsoftTheme as the default, the shared SkillsoftTheme type, and coreTheme kept only until the move to roles is done.
  • foundations/design-tokens.md: roles vs palette colors, --color-* custom properties, and elevation drawn in shadow-key and shadow-ambient.
  • guides/supporting-dark-mode.md: roles, and Background choosing its content mode from the build-time table.
  • guides/theming-your-app.md: passing a brand theme to GamutProvider, with role-based samples.
  • guides/creating-a-custom-theme.md: replaces the hand-built createTheme palette with building a brand with @skillsoft/gamut-brand. It covers defineBrand, overrides, the CLI (--watch and --check), createBrandTheme, types and previewing in Storybook. The override example was run through generateBrand and passes.

Smaller fixes

  • Code samples use roles instead of old names: installation (and SkillsoftTheme for the Emotion theme type), build your first page, prop groups, compose and variants, best practices and the ESLint rule examples.
  • components/containers/card.mdx documents default and brand, which replace the color variants, and the interactive shadow. Its story embeds pointed at atoms-card--* ids that no longer exist; they now use containers-card--*.
  • The button pages and BarChart no longer say "navy".
  • concepts/color-system.md drops its note that Color modes still describes the old names.

The site's own colors

src/styles/gamut-core-theme.css hand-copied old Core's navy, hyper and beige into Starlight's variables. It's now gamut-theme.css, and loads @skillsoft/gamut-styles/tokens.css first. Each Starlight variable points at the palette color its Gamut role uses in that mode, so the site follows the Skillsoft brand.

Starlight switches modes with data-theme, not data-color-mode, so the roles' mode blocks don't apply and the mapping is per mode in the file. Starlight's cascade layers come after Gamut's, so its own color-scheme and base styles still win.

Not in this PR

  • The gamut plugin pages still list percipio as a --theme value. That's the plugin's own flag, so it changes with the plugin.
  • The Storybook theme pages (Foundations → Theme) are styleguide content, not this site.

Stacked on #63, with #59 merged in.


PR Checklist

  • Related to designs:
  • Related to JIRA ticket: GMT-1825
  • Version plan added/updated (docs only; gamut-docs is private)
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions for the code change

Testing Instructions

  1. npx nx build gamut-docs: 154 pages build.
  2. npx nx dev gamut-docs, then switch the site between light and dark. The chrome uses Skillsoft's paper, navy and blue instead of Core's beige, navy and violet.
  3. Read Color modes, Themes, Design tokens, Supporting dark mode, Theming your app and Creating a custom theme. Check that no page names text, background, primary, navy, beige or hyper as colors.
  4. On Card, the story embeds load.

🤖 Generated with Claude Code

dreamwasp and others added 16 commits October 29, 2026 10:39
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…udio brands

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…olor-docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 45 roles: the shadow-* group (key, ambient, scrim) replaces backdrop.
- surface-raised is the lighter surface step, not a depth; navs and
  headers are surface-default, fields surface-raised.
- New guidance: raised surfaces take a border-subtle hairline, floating
  ones add a shadow, Card is default or brand.
- Brand role overrides need both attributes on one element.
- Elevation: old Core's hard offset for Original Codecademy, soft shadows
  elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t pairings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… your own brand

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The older color pages (color modes, design tokens, themes, supporting
dark mode, theming your app, creating a custom theme) described the old
aliases and Core theme. They now cover roles, the five brand themes and
building a brand with @skillsoft/gamut-brand. Code samples on other pages
use roles instead of old color names, Card documents its two variants,
and the site's own Starlight colors come from the Skillsoft brand's
tokens.css instead of a hand-copied Core palette.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers the variance createTheme and gamut-styles ColorMode prefixes, the
gamut-brand Style Dictionary prefix, the docs site and the regenerated tokens.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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