Skip to content

Inline shadcn compatibility tokens#1966

Draft
kmcginnes wants to merge 1 commit into
mainfrom
inline-shadcn-tokens
Draft

Inline shadcn compatibility tokens#1966
kmcginnes wants to merge 1 commit into
mainfrom
inline-shadcn-tokens

Conversation

@kmcginnes

Copy link
Copy Markdown
Collaborator

Description

Eliminates the shadcn/ui compatibility token layer by rewriting usages in components to canonical tokens and deleting the alias declarations from index.css.

Replacements:

Compat token Canonical replacement Files
bg-popover bg-background AlertDialog, DropdownMenu
text-popover-foreground text-foreground AlertDialog, DropdownMenu
text-destructive / bg-destructive text-danger / bg-danger Field, DropdownMenu
bg-accent bg-primary-subtle DropdownMenu
text-accent-foreground text-primary-foreground DropdownMenu
var(--color-popover) var(--color-background) Toaster
var(--color-popover-foreground) var(--color-foreground) Toaster

Deleted from @theme:

  • --color-destructive
  • --color-popover / --color-popover-foreground
  • --color-accent / --color-accent-foreground / --color-accent-hover

Also updates design.md: removes stale dark-mode and compat-token references from the migration banner, removes the accent paragraph.

Validation

  • pnpm checks passes
  • pnpm test passes (2178 tests)
  • Zero visual change (all compat tokens were aliases resolving to the same underlying values)

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

Replace shadcn compat aliases with canonical tokens in components:
- bg-popover / text-popover-foreground → bg-background / text-foreground
- text-destructive / bg-destructive → text-danger / bg-danger
- bg-accent / text-accent-foreground → bg-primary-subtle / text-primary-foreground

Delete the compat alias declarations (destructive, popover,
popover-foreground) and the accent alias group from index.css.
Update design.md to remove stale dark-mode and compat-token
references from the migration banner.
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.

Inline shadcn compatibility tokens

1 participant