Repository navigation
Conversation
Adds defineRecipe, compileRecipe, checkRecipe and StaticStyles. No component uses them yet. The jest base setup skips window.scrollTo in node-environment tests. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… cass-static-styles-groundwork # Conflicts: # .changeset/color-system-brands.md # packages/gamut-styles/src/colorSystem/README.md # packages/gamut-styles/src/themes/__tests__/__snapshots__/theme.test.ts.snap # packages/gamut/src/Alert/__tests__/Alert.test.tsx
The SSR test runs in a Node environment through a Vitest comment. The shared jsdom setup now skips its window guard when there is no window. 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>
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
# Conflicts: # script/jest/base-setup.js # yarn.lock
Takes white-label's layout for the generator, changeset and Alert test. Drops static's colorSystem README (moved to gamut-brand) and an orphaned theme snapshot under themes/__tests__. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
dreamwasp
changed the base branch from
cass-gmt-1825-color-brands
to
cass-gmt-1825-color-white-label
December 2, 2026 20:24
5 of 6 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Groundwork for moving gamut's components off runtime Emotion styles. It adds the pieces a component needs to ship its styles as compiled CSS, and nothing uses them yet. Nothing renders differently. Draft, stacked on #52, so it merges after #52. Plan and reasoning:
gamut/color-tokens/static-styles-spike.mdin Base Camp.What's added (
packages/gamut-styles/src/static/)defineRecipe: a component's styles as data (base, namedvariants,defaultVariants,compoundVariants), in Chakra's and Panda's recipe shape, written with the same style objects ascss()andvariant().recipe.stylesis the same recipe as an Emotion style function, so a component can move to a recipe while still on Emotion.recipe.classNames(props)gives stable class names likegamut-chip gamut-chip--intent_danger.recipe.splitPropsseparates variant props from the rest so they aren't forwarded to the DOM.compileRecipe: plain CSS for a recipe's class names, inside@layer recipes.checkRecipe: compiles the recipe for every brand theme and reports whether the output differs. A recipe that uses a per-brand value (for examplefontFamily: 'accent') fails and names the brand.StaticStyles: puts compiled CSS on the page once, through the Emotion cache, so SSR, nonces and stylis plugins work as they do today.packages/gamut-styles/src/static/README.mdhas the steps for moving a component and the rules a recipe has to follow to compile.What's not in this PR
states()has no recipe shape yet. Boolean variant keys (true/false) come in a later step, andfalsein a selection currently turns a group off, so that needs a decision first.compileReciperuns once per module in the browser.checkRecipeuntil they become CSS variables.Small unrelated change:
script/jest/base-setup.jsskipswindow.scrollTowhen there's nowindow, so@jest-environment nodetests (server rendering) run.PR Checklist
styledfrom gamut.changeset/static-styles-groundwork.md, minor)__tests__/recipe.test.tsx,__tests__/StaticStyles.ssr.test.tsx)Testing Instructions
packages/gamut-styles/src/static/README.md, then look at the samplechiprecipe in__tests__/recipe.test.tsx. It showsrecipe.styles,classNames,compileRecipe, and acheckRecipefailure case.static/.PR Links and Envs
Breaking changes: none. Additive only.
🤖 Generated with Claude Code
Build:
yarn buildfails on this PR:gamut:buildtype-checks components that still use the old color names. The migration to color roles is in #54, and the build passes there (cass-gmt-1825-color-components, af734ec).