feat(tokens)!: standardize component token axis naming#134
Open
wangdicoder wants to merge 1 commit intomasterfrom
Open
feat(tokens)!: standardize component token axis naming#134wangdicoder wants to merge 1 commit intomasterfrom
wangdicoder wants to merge 1 commit intomasterfrom
Conversation
Rename 330 component token keys so size and state axes are trailing dot-separated segments with property-before-state ordering, matching the convention used by Atlassian, Polaris, Carbon, and Spectrum. 82 public CSS variables are renamed as a result. Adds a build-time validator that rejects dash-joined or mid-leaf axis segments, and documents the rule in REGISTRY_SPEC.md. BREAKING CHANGE: public --ty-* CSS variable names and token registry keys for component tokens have been renamed. Themes and stylesheets overriding component tokens must be updated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
--ty-*CSS variables and 26 consumer SCSS files inpackages/reactandapps/docs.themes/dark.jsonandcompile-brand-theme.source.jsto the new keys.scripts/build-runtime.js) that rejects dash-joined or mid-leaf axis segments; allowfocus-ringas a domain compound and pure-axis leaves likeselected-hover.packages/tokens/REGISTRY_SPEC.md.Examples:
button.font-size-smbutton.font-size.smbutton.solid.primary.bg-hoverbutton.solid.primary.bg.hoverpagination.disabled-bgpagination.bg.disabledauto-complete.option-active-bgauto-complete.option.bg.activedescriptions.lg-padding-hrdescriptions.padding-hr.lgdate-picker.cell-selected-hover-bgdate-picker.cell.bg.selected-hoverRelease
@tiny-design/tokens,@tiny-design/react(fixed-version group)Breaking changes
--ty-*CSS variable names for component tokens have changed. Apps overriding these in stylesheets must update to the new names.tokens.componentskeys in custom theme JSON documents must be migrated.Test plan
pnpm --filter @tiny-design/tokens buildpnpm --filter @tiny-design/react buildpnpm --filter @tiny-design/react test(810/810 pass, 81 snapshots intact)pnpm --filter @tiny-design/docs build🤖 Generated with Claude Code