Skip to content

feat(gamut-styles)!: generated color system with tokens.css as the color contract - #50

Open
dreamwasp wants to merge 33 commits into
mainfrom
cass-gmt-1825-color-system
Open

dreamwasp wants to merge 33 commits into
mainfrom
cass-gmt-1825-color-system

Conversation

@dreamwasp

@dreamwasp dreamwasp commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Stack 1 of 7 (bottom). Base: main. Review and merge first. Next: #52.
Owns the generator and the tokens.css color contract. Everything above it builds on this.


Overview

Adds the generated color system from design's sandbox to gamut-styles: an OKLCH palette (8 slots × 11 grades) and 43 semantic roles in light and dark. The output is checked in as static tokens.css, DTCG-shaped JSON and TS constants. Static CSS owns every color value; the Emotion theme only names them.

Draft: gamut doesn't build yet (284 type errors in 66 files), because components still use the old color names. #54 moves them. gamut-styles typechecks with no errors.

Ships with the stack. Land this PR together with the PRs stacked on it: #52, then #58, #54, #59, #63, #66 and #67. They need to pass CI as one set. The build check stays red until #54 is in, because gamut doesn't compile before then. The full preview is #73.

Color system

  • gamut-styles/src/colorSystem: the generator. A brand's hues go in; the palette and roles come out. validate:tokens checks parity with design's reference fixture (88 rungs, every role) and the contrast guarantees.
  • contentModes.ts: which mode's content sits on each palette color, decided at build time. Matches what Background picked at runtime on all 90 colors.
  • migration.ts: design's old → new color map and per-component slots. Checked for every brand: 32 aliases mapped once, 200 text and icon pairings clear their tier.
  • packages/gamut-styles/src/colorSystem/README.md: the generator's pipeline, commands, CI coverage and known gaps.
  • packages/gamut-styles/README.md: the color tokens for consumers (exports, tokens in the browser, naming, known limits).

Outputs

  • src/tokens/generated/: tokens.css, the same CSS as a string (tokensCss.ts), the DTCG-shaped JSON files and values.ts, all checked in. build:tokens writes them and refuses to emit if a check fails.
  • @skillsoft/gamut-styles/tokens, /tokens.css, /tokens/*.tokens.json: new exports. The tokens entry has no React or Emotion dependency.

Theme and runtime

  • themes/skillsoft.ts: the new default theme, built from the generated values. It carries tokens.css as tokensCss, and GamutProvider injects it through Emotion by default (useTokens={false} opts out).
  • typings/theme.d.ts, GamutProvider, AssetProvider: gamut is typed against and defaults to skillsoftTheme.
  • Background: reads theme.contentModes when the theme has it, and keeps polished's contrast math as the fallback for themes without it.
  • ColorMode, globals/Reboot: roleOr asks for the new role name and falls back to the old one, for brand themes that define old names.
  • The core, admin, platform, lxStudio and percipio themes are removed here. originalCodecademy, then admin, platform and lxStudio, come back as brands in the PRs that follow.
  • remoteAssets/fonts.ts: the skillsoft theme loads its own fonts instead of Percipio's.

Agent skills

  • gamut-agent-tools skill renamed from gamut-scope-swap to gamut-migration. It covers every @skillsoft/gamut-codemods preset: a presets table, one workflow, a section per preset (scope-swap, color-roles), and guidance for documenting a new preset. The agent-tools README points to it.

Components and Storybook

  • gamut/src/Alert: design's mapping: status tints, an icon color per variant, the brand gradient on Feature, and a border-default floating border.
  • .storybook: the theme toolbar offers Skillsoft only. GamutProvider injects tokens.css for it.
  • styleguide: Foundations / Color system / CSS contract. Plain-CSS modes, CSS-only surfaces, and gamut components inside a CSS-only dark subtree.

Dependencies

Three gamut-styles devDependencies, used only by the build scripts. None of them is in dist:

  • culori: the generator's color math (OKLCH and sRGB conversion, the gamut boundary, WCAG contrast, ΔE 2000, color-blindness simulation).
  • style-dictionary (pinned at 5.7.0): renders tokens.css from the DTCG files.
  • jiti: runs the TypeScript scripts (build:tokens, validate:tokens) without a compile step.

Stacked PRs: #52 builds on this, and #66 moves the generator into @skillsoft/gamut-brand so a team can build its own brand.


PR Checklist

  • Related to designs: gamut-sandbox PR fix: update spinner to match cc gamut #34
  • Related to JIRA ticket: GMT-1825
  • Changeset added
  • 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
  • Package previews from this PR are passing end-to-end tests in all relevant consuming repositories

Testing Instructions

Foundation only: gamut-styles. gamut doesn't compile until #54, so skip gamut tests and Storybook here. The full stack is in #73.

  1. yarn workspace @skillsoft/gamut-styles validate:tokens → "all checks pass".
  2. yarn workspace @skillsoft/gamut-styles build:tokens, then git status → no changes.
  3. yarn nx test gamut-styles → 13 suites, 206 tests pass.

🤖 Generated with Claude Code

Build: yarn build fails on this PR: gamut:build type-checks components that still use the old color names, and #54 moves them to color roles. The build passes on #54 (cass-gmt-1825-color-components, af734ec).

dreamwasp and others added 2 commits October 26, 2026 15:12
…t (WIP)

Builds on the color system spike (gamut-sandbox PR #34; generator at
dffd84b, unchanged through 4b73c2a).

- tokens.css owns the color values: skillsoftTheme no longer injects
  the palette, so OKLCH renders through Emotion too. Mode blocks set
  color-scheme, color and a default --color-background-current.
- Content modes decided at build time (colorSystem/contentModes.ts).
  Background reads theme.contentModes instead of running polished;
  the table matches the runtime choice on all 90 palette colors.
- Design's migration map (sandbox migration.ts at 4b73c2a) ported in
  place of legacyAliases.ts, with its alias, role and component-slot
  contrast checks, run for any brand.
- Alert follows design's mapping.
- ColorMode, Background and Reboot fall back to the old role names, so
  ColorMode keeps working on every theme.

gamut is typed against skillsoftTheme with no legacy names, so the
gamut build still fails (284 type errors in 66 files). Findings in
Base Camp gamut/color-tokens/.

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

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
909 3 906 0
View the top 3 failed test(s) by shortest run time
packages/gamut/src/Card/Card.test.tsx > useCardElevation > resolves borderRadius from lxStudioTheme
Stack Traces | 0.00275s run time
TypeError: Cannot read properties of undefined (reading 'borderRadii')
 ❯ forEach .../src/Card/Card.test.tsx:78:21
 ❯ .../src/Card/Card.test.tsx:64:35
packages/gamut/src/Card/Card.test.tsx > useCardElevation > resolves borderRadius from percipioTheme
Stack Traces | 0.00364s run time
TypeError: Cannot read properties of undefined (reading 'borderRadii')
 ❯ forEach .../src/Card/Card.test.tsx:78:21
 ❯ .../src/Card/Card.test.tsx:64:35
packages/gamut/src/Card/Card.test.tsx > useCardElevation > resolves borderRadius from coreTheme
Stack Traces | 0.0148s run time
TypeError: Cannot read properties of undefined (reading 'borderRadii')
 ❯ forEach .../src/Card/Card.test.tsx:78:21
 ❯ .../src/Card/Card.test.tsx:64:35

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

dreamwasp and others added 2 commits October 28, 2026 14:12
React apps get the color values without loading tokens.css: the build also
writes it as a string, generated themes carry it as `tokensCss`, and
GamutProvider renders it as an Emotion global, first among its globals.
`useTokens={false}` opts out for pages that load the static file. The
static file stays for pages without React or Emotion. Storybook drops its
own injection outside the test path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dreamwasp added a commit that referenced this pull request Nov 4, 2026
…om design's map

Design's feedback on the drafts: inputs use surface-raised. The fields
already did; an unchecked Checkbox didn't, and a disabled DatePicker
never looked disabled (its `:disabled` rule is on a div). Its error ring
was the raw string `feedback-error`, so it never drew.

The rest comes from an audit against design's component map (sandbox
df33b47) and the elevation proposal (sandbox #50):

- Field placeholder `text-subtle` (the selector was `&:placeholder`),
  error a 2px `text-error` outline at rest, `activated` keeps
  `border-default`; the same in SelectDropdown, whose disabled value is
  `text-subtle` and whose focused selected option keeps its selected veil.
- Checkbox disabled check mark and Disclosure's disabled overline are
  `surface-raised` knockouts. Radio's disabled ring is `border-default`;
  its error hover ring is `action-primary`.
- FormGroupDescription `text-subtle`, Breadcrumbs separator `text-subtle`,
  Anchor hover `action-primary-hover` and focus rings `action-primary`.
- List: hover is a veil over the row's fill, focus a ring with no fill,
  the first row's top rule `border-subtle`, the table header rule
  `border-default`, the scroll shadow `border-subtle`.
- Shimmer: `surface-sunken` with a `surface-raised` sweep, no rgba.
- The checker pattern (Modal, Toast, PreviewTip, DatePicker calendar)
  only on Original Codecademy, in `border-subtle`; the calendar gets a
  `border-subtle` edge.
- The Core Theme page says brand themes draw shadows in shadow-key and
  shadow-ambient.

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

The generator (src/colorSystem/), its scripts (build-tokens, validate-tokens),
the sandbox fixture and the tenant probe are a spike, not shipped API. They
move to cass-gmt-1825-color-spike, which is the full tree from this commit's
parent. The generated output under src/tokens/generated/ stays here, because
the runtime needs it.

Removes the build-only dependencies (culori, jiti, style-dictionary). Runtime
code imported nothing from colorSystem, only comments, which now point at the
spike branch.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
dreamwasp and others added 3 commits November 9, 2026 13:50
…nerator

The package README covers what ships: the token exports, tokens in the
browser, naming and known limits for consumers. The colorSystem README
covers the generator: pipeline, commands, what CI checks, and generator gaps.

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

# Conflicts:
#	packages/gamut-styles/src/__tests__/Background.test.tsx
@dreamwasp
dreamwasp marked this pull request as ready for review November 9, 2026 19:36
@dreamwasp
dreamwasp requested a review from a team as a code owner November 9, 2026 19:36
dreamwasp and others added 2 commits November 10, 2026 08:44
core, admin, platform, lxStudio and percipio are removed. skillsoftTheme is the
only theme here; the brand themes built on the generator (originalCodecademy,
then admin, platform and lxStudio) come back in the PRs that follow.

Storybook's theme toolbar and docs container map to skillsoftTheme only, and
the tests that compared old themes now run against skillsoftTheme.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@dreamwasp
dreamwasp marked this pull request as draft November 10, 2026 16:24
@dreamwasp
dreamwasp marked this pull request as ready for review November 12, 2026 19:03
dreamwasp and others added 5 commits November 12, 2026 14:03
Roboto 500 and 700 share one bold file, so the preload list had two links
with the same key (the file URL), and React warned about duplicate keys.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The skill triaged scope-swap only. Add a color-roles section: the dry-run and
real-run steps, what the warnings and color-roles: comments mean and what to
do for each, the checks before calling it done, and what not to do. The
description names the preset so the skill triggers on color-name work.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…on and cover every preset

The skill covered scope-swap only. It's now gamut-migration: a presets table,
one workflow for all presets, a section per preset (scope-swap, color-roles),
and a section on documenting a new preset. Renames the changeset to match.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
dreamwasp and others added 2 commits November 18, 2026 11:56
…section

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

- next-config: removing esmExternals: false is necessary but not always enough. Build each app and fix the routes that still fail at prerender.
- CI: the job that runs sync-gamut-deps fails too, so change it with the script.
- resolutions: yarn why can list two lock locators after a pin, with one copy installed. Check node_modules.
- tsconfig-dom: the codemod warns only where gamut is imported.
- Missing peers: @vidstack/react, react-player and stylis, with the range to add by hand.
- color-roles: a palette name can map to different roles by slot, so use the context in the comment. Keep each app's theme, since the choice changes the spacing scale.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Injected globals override dark-mode colors with light-mode aliases, and production bundlers can discard the CSS required by apps using useTokens={false}.

3 open issues
What changed in this PR

Introduces generated color tokens as Gamut’s shared color contract and makes skillsoftTheme the default. This foundation ships with the stacked brand and component migrations; gamut remains unbuildable until #54.

Changes:

  • Adds palette generation, semantic roles, validation, and public CSS, JSON, and TypeScript exports.
  • Connects the generated tokens to themes, providers, background contrast selection, and Alert styling.
  • Updates Storybook, tests, consumer documentation, and migration guidance.
File Description
packages/​styleguide/​src/​lib/​Foundations/​ColorMode/​CssContract.stories.tsx Demonstrates CSS-only modes and surfaces.
packages/​gamut/​src/​Alert/​variants.tsx Maps variants to roles and a brand gradient.
packages/​gamut/​src/​Alert/​Alert.tsx Applies variant gradients and icon colors.
packages/​gamut-styles/​tsdown.config.ts Adds the tokens build entry.
packages/​gamut-styles/​src/​utilities/​__tests__/​useLogicalProperties.test.tsx Uses Skillsoft in logical-property tests.
packages/​gamut-styles/​src/​utilities/​__tests__/​themed.test.ts Tests lookups against the new theme.
packages/​gamut-styles/​src/​typings/​theme.d.ts Types Emotion against SkillsoftTheme.
packages/​gamut-styles/​src/​tokens/​index.ts Exports framework-independent token data.
packages/​gamut-styles/​src/​tokens/​generated/​tokensCss.ts Provides generated CSS for runtime injection.
packages/​gamut-styles/​src/​tokens/​generated/​tokens.css Defines palette variables and mode-specific roles.
packages/​gamut-styles/​src/​tokens/​generated/​light.tokens.json Supplies light-mode token references.
packages/​gamut-styles/​src/​tokens/​generated/​dark.tokens.json Supplies dark-mode token references.
packages/​gamut-styles/​src/​themes/​skillsoft.ts Builds the default theme from generated tokens.
packages/​gamut-styles/​src/​themes/​platform.ts Removes the legacy Platform theme.
packages/​gamut-styles/​src/​themes/​percipio.ts Removes the legacy Percipio theme.
packages/​gamut-styles/​src/​themes/​lxStudio.ts Removes the legacy LX Studio theme.
packages/​gamut-styles/​src/​themes/​index.ts Exports Skillsoft instead of legacy themes.
packages/​gamut-styles/​src/​themes/​core.ts Removes the legacy Core theme.
packages/​gamut-styles/​src/​themes/​admin.ts Removes the legacy Admin theme.
packages/​gamut-styles/​src/​themes/​__tests__/​theme.test.ts Switches theme snapshot coverage to Skillsoft.
packages/​gamut-styles/​src/​remoteAssets/​fonts.ts Maps Skillsoft to the Percipio font assets.
packages/​gamut-styles/​src/​index.ts Changes the default theme export.
packages/​gamut-styles/​src/​globals/​Typography.tsx Accepts the shared Emotion theme type.
packages/​gamut-styles/​src/​globals/​Reboot.tsx Uses roles with legacy-name fallbacks.
packages/​gamut-styles/​src/​GamutProvider.tsx Defaults to Skillsoft and injects token CSS.
packages/​gamut-styles/​src/​colorSystem/​validate.ts Checks contrast and content-mode guarantees.
packages/​gamut-styles/​src/​colorSystem/​system.ts Resolves brand inputs into palettes and roles.
packages/​gamut-styles/​src/​colorSystem/​roles.ts Defines semantic roles and gradient data.
packages/​gamut-styles/​src/​colorSystem/​README.md Documents generation, checks, and known gaps.
packages/​gamut-styles/​src/​colorSystem/​ramp.ts Generates graded OKLCH color ramps.
packages/​gamut-styles/​src/​colorSystem/​probe.ts Reports tenant contrast and status separation.
packages/​gamut-styles/​src/​colorSystem/​emit.ts Produces JSON tokens and TypeScript constants.
packages/​gamut-styles/​src/​colorSystem/​contentModes.ts Precomputes content modes for palette colors.
packages/​gamut-styles/​src/​colorSystem/​brands/​skillsoft.ts Supplies Skillsoft’s brand hues.
packages/​gamut-styles/​src/​colorSystem/​brand.ts Defines brand inputs and missing-hue derivation.
packages/​gamut-styles/​src/​colorSystem/​__tests__/​system.test.ts Tests guarantees and generated-output consistency.
packages/​gamut-styles/​src/​ColorMode.tsx Supports role names with legacy fallbacks.
packages/​gamut-styles/​src/​Background.tsx Uses precomputed content modes when available.
packages/​gamut-styles/​src/​AssetProvider.tsx Defaults to Skillsoft and deduplicates font preloads.
packages/​gamut-styles/​src/​__tests__/​testUtils.tsx Uses Skillsoft in the shared test provider.
packages/​gamut-styles/​src/​__tests__/​GamutProvider.test.tsx Covers token injection and opt-outs.
packages/​gamut-styles/​src/​__tests__/​GamutProvider.csp.test.tsx Uses Skillsoft for nonce coverage.
packages/​gamut-styles/​src/​__tests__/​fontLoading.test.tsx Moves font-loading tests to Skillsoft.
packages/​gamut-styles/​src/​__tests__/​Background.test.tsx Tests generated palette and semantic backgrounds.
packages/​gamut-styles/​src/​__tests__/​AssetProvider.test.tsx Covers Skillsoft defaults and preload deduplication.
packages/​gamut-styles/​scripts/​validate-tokens.ts Checks reference parity and CSS round-tripping.
packages/​gamut-styles/​scripts/​build-tokens.ts Validates and writes generated token outputs.
packages/​gamut-styles/​README.md Documents token exports and browser setup.
packages/​gamut-styles/​project.json Packages CSS/JSON assets and adjusts verification.
packages/​gamut-styles/​package.json Adds token exports and generator dependencies.
packages/​gamut-agent-tools/​skills/​gamut-migration/​SKILL.md Expands migration guidance across codemod presets.
packages/​gamut-agent-tools/​skills/​gamut-migration/​NEXT_EMOTION_INTEROP.md Carries Next.js interoperability guidance under the renamed skill.
packages/​gamut-agent-tools/​skills/​gamut-migration/​BREAKING_CHANGES.md Carries scope-migration notes under the renamed skill.
packages/​gamut-agent-tools/​README.md Points consumers to the broader migration skill.
packages/​.storybook/​theming/​GamutThemeProvider.tsx Uses Skillsoft backgrounds and token CSS.
packages/​.storybook/​systemProps.ts Sources control tokens from Skillsoft.
packages/​.storybook/​preview.ts Makes Skillsoft the sole toolbar theme.
packages/​.storybook/​main.ts Resolves token subpaths to source files.
packages/​.storybook/​components/​Elements/​DocsContainer.tsx Moves the docs container to Skillsoft.
.prettierignore Excludes generated token outputs.
.changeset/​gamut-scope-swap-skill.md Removes the superseded skill release note.
.changeset/​gamut-migration-skill.md Adds the migration skill release note.
.changeset/​color-system-tokens.md Records token exports and theme migration changes.

Review effort: Balanced

Comment thread packages/gamut-styles/package.json Resolved
join(__dirname, '../../tokens/generated/tokens.css'),
'utf8'
);
expect(tokensCss).toBe(css);
dreamwasp and others added 4 commits November 19, 2026 14:58
…gration skill

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

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

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…ser in the gamut-migration skill

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

@LinKCoding LinKCoding left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some cleanup around theme - since skillsoftheme is the only one being exported anymore.

But overall, the flow makes sense and the new tooling is cool!

lxStudio: lxStudioTheme,
percipio: percipioTheme,
platform: platformTheme,
skillsoft: skillsoftTheme,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol at some point we should just remove the option to try out themes then since it's only 1

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole file could generally be cleaned up and hardcoded to just be skillsoftTheme

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reintroduce other themes in the next PR - #52

const themeBackground: Record<ColorModes, 'white' | 'navy'> = {
light: 'white',
dark: 'navy',
/* The skillsoft theme's surface-default values, as palette colors. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 comment

lxStudio: lxStudioTheme,
percipio: percipioTheme,
platform: platformTheme,
skillsoft: skillsoftTheme,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could simplify themeMap here too

name: 'Theme',
description: 'Global theme for components',
defaultValue: 'core',
defaultValue: 'skillsoft',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably be removed altogether, unless the idea is that we add back support to some themes (but that doesn't seem to be the case)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are adding back themes

percipio: percipioTheme,
lxStudio: lxStudioTheme,
};
const themes = { skillsoft: theme };

const cases = Object.entries(themes).flatMap(([name, t]) =>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these cases and the it.each block can be simplified if we're just testing against skillsoftTheme only

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are adding back themes

}).not.toThrow();
});

it('should handle rapid theme changes without errors', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an accurate these anymore?
cause it's the same theme now

const typedPercipioTheme = skillsoftTheme as any;

import { createEmotionCache } from '../cache';
import { GamutProvider, useNonce } from '../GamutProvider';
import { coreTheme as theme } from '../themes';
import { skillsoftTheme, skillsoftTheme as theme } from '../themes';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import can be cleaned up

@@ -0,0 +1,140 @@
/* eslint-disable @skillsoft/gamut/no-inline-style -- these stories show plain CSS with no Emotion, so inline styles are the point. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a quick note that this will have to move since styleguide got cut

dreamwasp and others added 3 commits November 20, 2026 08:42
…ate-stylis symptom

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Merges main (through 45586df) into the color system branch.

- Test files moved beside their sources (#79) and use Vitest (#80). The
  branch's style tests keep their own content, re-pointed at the new
  locations, with theme and mock names unchanged.
- Modal, Tabs and other main-side story migrations merge clean.
- gamut's components are not migrated on this branch (that is #54), so
  gamut's type check still reports the 284 old-name errors recorded in
  the spike. This commit's gate is gamut-styles.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
dreamwasp added a commit that referenced this pull request Nov 20, 2026
Replaces this branch's tree with the color stack as it now stands: the
site branch (#67, which includes #63, #59, #54, #66, #58, #52 and #50,
each merged with main through 45586df), plus the codemod branch (#53).
Static styles (#69) is still out, as before.

The preview's earlier head is the parent. This commit only moves the
tree forward, so nothing is rewritten.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@dreamwasp
dreamwasp added this pull request to stack #96 November 24, 2026 13:41
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Dec 2, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

…ft check

- Filter --color-* out of _variables.mode as well as _variables.root, so the
  light-mode aliases no longer override tokens.css on a dark root.
- Mark **/*.css as side-effectful instead of the whole package, so bundlers
  keep `import '@skillsoft/gamut-styles/tokens.css'` while JS stays
  tree-shakeable.
- Move the Style Dictionary pipeline into colorSystem/build.ts and test that a
  fresh generation matches the checked-in tokens, so generator drift fails CI.
- Drop the duplicate `skillsoftTheme as theme` alias in GamutProvider.test.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@dreamwasp
dreamwasp removed this pull request from stack #96 December 2, 2026 20:18
dreamwasp and others added 4 commits December 3, 2026 08:31
…echeck

The lib build ran tsc over src/colorSystem/build.ts, which imports
style-dictionary. Its types don't resolve under the package's moduleResolution,
so `nx build gamut-styles` failed. Nothing in the library imports the
generator (only the token script and its drift test), so exclude it.

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

The jsdom setup already registers the Emotion matchers for every test.

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

The CSS generator lived inside buildTokens, so the only way to get tokens.css
was to write the whole output directory. Move it into css.ts as
generateTokensCss(system), which returns the file contents.

Drift checks now compare the generator output with the checked-in tokens.css
directly, in the color system test and in validate:tokens. The existing copy
check (tokensCss.ts vs tokens.css) and the full-directory regeneration check
stay in place.

css.ts is excluded from the library typecheck alongside build.ts, since it
imports style-dictionary.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The drift test built its own path to the generated folder; use the readGenerated
helper the other tests already share.

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.

4 participants