-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove reliance on CTI, add token type
- Loading branch information
1 parent
7d0423d
commit cf26ff4
Showing
88 changed files
with
1,208 additions
and
1,519 deletions.
There are no files selected for viewing
This file contains 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,38 @@ | ||
--- | ||
'style-dictionary': major | ||
--- | ||
|
||
Remove reliance on CTI token structure across transforms, actions and formats. | ||
|
||
Breaking changes: | ||
|
||
- Token type will now be determined by "type" (or "$type") property on the token, rather than by checking its CTI attributes. | ||
- Types are mostly aligned with [DTCG spec types](https://design-tokens.github.io/community-group/format/#types), although a few additional ones have been added for compatibility reasons: | ||
- asset -> string type tokens where the value is a filepath to an asset | ||
- icon -> content type string tokens where the content resembles an icon, e.g. for icon fonts like [Microsoft codicons](https://github.com/microsoft/vscode-codicons) | ||
- html -> HTML entity strings for unicode characters | ||
|
||
Before: | ||
|
||
```json | ||
{ | ||
"color": { | ||
"red": { | ||
"value": "#FF0000" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
After: | ||
|
||
```json | ||
{ | ||
"color": { // <-- this no longer needs to be "color" in order for the tokens inside this group to be considered of type "color" | ||
"red": { | ||
"value": "#FF0000", | ||
"type": "color" | ||
} | ||
} | ||
} | ||
``` |
This file contains 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
Oops, something went wrong.