-
Notifications
You must be signed in to change notification settings - Fork 51
Project Solar: update format of the tokens to use the DTCG format #3148
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
base: project-solar/phase-1/HDS-5200_SD-DTCG/style-dictionary-5.0
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…en updated) updated: `value` → `$value` updated: `type` → `$type` added: `$unit` (for `dimension` types) updated: `attributes{}` (removed `type’ and `item` keys, we’ve removed built-in CTI transform and added a custom one just for the category)
…local development) This reverts commit 30695d4.
4fbb473
to
409c144
Compare
"type": "size", | ||
"$type": "dimension", | ||
"$value": "3px", | ||
"unit": "px", |
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.
Is the value supposed to include the unit as well?
"$value": "3px",
"unit": "px",
It shouldn't be formatted as in this example?
https://www.designtokens.org/tr/drafts/format/#example-2
https://www.designtokens.org/tr/drafts/format/#dimension
"$value": {
"value": 3,
"unit": "px"
},
📌 Summary
This PR builds on top of #3139 to change the format used for our design tokens to follow as much as possible the DTCG format.
We will leverage this new format to introduce the “experimental”
$modes
object for multi-theme (colocated theme) tokens.🛠️ Detailed description
In this PR I have:
src
tokens to DTCG formatbuild
script so that it would support the new formatthrow
assertions) but we didn't noticepnpm build
to make sure the output indist
remained exactly the sameOutcome: apart from the JSON files, all the CSS files have remained exactly the same, which was the goal from the beginning: this gives us confidence that we're not introducing
Website preview: https://hds-website-git-project-solar-phase-1hds-5200s-f936f2-hashicorp.vercel.app/foundations/tokens
🔗 External links
Jira ticket: https://hashicorp.atlassian.net/browse/HDS-5462
👀 Component checklist
💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.