Rename color.ansi.* → ansi.* and color.prettylights.syntax.* → prettylights.syntax.*#1352
Rename color.ansi.* → ansi.* and color.prettylights.syntax.* → prettylights.syntax.*#1352lukasoppermann wants to merge 1 commit intomainfrom
Conversation
…lights.syntax.* Drop the generic 'color.' prefix from ANSI and prettylights syntax tokens to align with domain-specific naming (bgColor, fgColor, borderColor, display). New CSS vars: --ansi-red, --prettylights-syntax-keyword Old CSS vars kept as deprecated aliases: --color-ansi-red: var(--ansi-red) - Add $description to all 47 individual tokens - Add deprecated aliases with $deprecated field for migration - Update token-authoring.md with naming conventions and deprecation guide Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Design Token Diff (CSS)The message is too long to be displayed here. For more details, please check the job summary. |
Design Token Diff (StyleLint)The message is too long to be displayed here. For more details, please check the job summary. |
Design Token Diff (Figma)The message is too long to be displayed here. For more details, please check the job summary. |
There was a problem hiding this comment.
Pull request overview
This PR updates functional syntax color token naming by promoting ansi.* and prettylights.syntax.* to first-class (non-color.*) token groups, while retaining the previous color.ansi.* and color.prettylights.syntax.* names as deprecated aliases for backward compatibility.
Changes:
- Renames token paths from
color.ansi.*→ansi.*andcolor.prettylights.syntax.*→prettylights.syntax.*. - Adds deprecated alias tokens that reference the new canonical tokens via
{...}references (and marks them with$deprecated+ “Deprecated. Use … instead.” descriptions). - Updates token authoring documentation with guidance for renames/deprecations and naming conventions.
Show a summary per file
| File | Description |
|---|---|
| src/tokens/functional/color/syntax.json5 | Introduces new canonical ansi.* and prettylights.syntax.* token groups and adds deprecated color.* aliases. |
| contributor-docs/agents/token-authoring.md | Documents conventions for renaming/deprecating tokens and the expected naming patterns. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (2)
src/tokens/functional/color/syntax.json5:396
prettylights.syntax.entity-tagchanges thedarkoverride from{base.color.neutral.8}to{base.color.green.1}and adds additional color-vision overrides. This is a functional palette change beyond the rename/deprecation work; please confirm it's intentional (and document it) or keep the previous override values to avoid unexpected visual diffs.
dark: '{base.color.green.1}',
'dark-tritanopia': '{base.color.blue.1}',
'dark-tritanopia-high-contrast': '{base.color.blue.1}',
'dark-protanopia-deuteranopia': '{base.color.blue.1}',
'dark-protanopia-deuteranopia-high-contrast': '{base.color.blue.1}',
src/tokens/functional/color/syntax.json5:562
prettylights.syntax['string-regexp']modifies several overrides (e.g.darkfrom{base.color.green.3}to{base.color.green.1}, and the tritanopia/protanopia mappings from*.3to*.1). If this PR’s scope is limited to renames + deprecated aliases, consider reverting these value changes (or explicitly documenting them) to avoid unexpected syntax highlighting changes across themes.
dark: '{base.color.green.1}',
'dark-tritanopia': '{base.color.blue.1}',
'dark-tritanopia-high-contrast': '{base.color.blue.1}',
'light-tritanopia': '{base.color.blue.6}',
'light-tritanopia-high-contrast': '{base.color.blue.6}',
'dark-protanopia-deuteranopia': '{base.color.blue.1}',
'dark-protanopia-deuteranopia-high-contrast': '{base.color.blue.1}',
- Files reviewed: 2/2 changed files
- Comments generated: 1
| 'org.primer.overrides': { | ||
| dark: '{base.color.neutral.6}', | ||
| dark: '{base.color.neutral.9}', | ||
| }, |
What
Drop the generic
color.prefix from ANSI and prettylights syntax tokens to align with the domain-specific naming convention used elsewhere (bgColor,fgColor,borderColor,display).Changes
Token renames (non-breaking)
--color-ansi-red--ansi-red--color-prettylights-syntax-keyword--prettylights-syntax-keywordBackward compatibility
Old tokens are kept as deprecated aliases using
var()references:Descriptions
Added
$descriptionto all 47 individual tokens (17 ANSI + 30 prettylights).Documentation
Updated
contributor-docs/agents/token-authoring.mdwith:Validation
npm run lintnpm run format:fixnpm run test(9/9 passed)npm run buildvar(--new-name)references