Repository navigation
Convert CSS variables to Tailwind 4 theme variables #432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
maurer2
wants to merge
4
commits into
TanStack:main
Choose a base branch
from
maurer2:design-tokens-tailwind-4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e3c19f1
Converted CSS vars to theme variables
maurer2 806ce73
Merge remote-tracking branch 'upstream/main' into design-tokens-tailw…
maurer2 b590a29
Replaced variable names with new names in recently added code
maurer2 bdcc6b1
fix(create): preserve add-on colors in Tailwind theme utilities
tannerlinsley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@tanstack/create': patch | ||
| --- | ||
|
|
||
| Use Tailwind theme utilities while preserving existing scaffold color variables for add-ons and light and dark themes. |
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: TanStack/cli
Length of output: 48489
Web query:
Tailwind CSS v4 theme variable namespace --color custom colors @theme inline utilities documentationResult:
Script executed:
Repository: TanStack/cli
Length of output: 21230
Script executed:
Repository: TanStack/cli
Length of output: 7277
Add the base color mappings to the Shadcn stylesheet.
With examples enabled and Shadcn selected, the add-on replaces the base stylesheet. Tailwind therefore cannot generate utilities such as
bg-header-bgandborder-chip-line. Header backgrounds disappear and borders use the Shadcn fallback color.Suggested fix
In
packages/create/src/frameworks/react/add-ons/shadcn/assets/src/styles.css:@theme inline { --font-sans: 'Manrope', ui-sans-serif, system-ui, sans-serif; + --color-sea-ink: var(--sea-ink); + --color-sea-ink-soft: var(--sea-ink-soft); + --color-lagoon: var(--lagoon); + --color-lagoon-deep: var(--lagoon-deep); + --color-palm: var(--palm); + --color-sand: var(--sand); + --color-foam: var(--foam); + --color-surface: var(--surface); + --color-surface-strong: var(--surface-strong); + --color-line: var(--line); + --color-inset-glint: var(--inset-glint); + --color-kicker: var(--kicker); + --color-bg-base: var(--bg-base); + --color-header-bg: var(--header-bg); + --color-chip-bg: var(--chip-bg); + --color-chip-line: var(--chip-line); + --color-link-bg-hover: var(--link-bg-hover); + --color-hero-a: var(--hero-a); + --color-hero-b: var(--hero-b); --color-background: var(--background);