You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading my project to version 4, I have a question regarding the definition of token types.
In version 3, I didn’t need to specify the token type individually for each token. However, in version 4, I noticed that the transforms are now looking for the token types in a different path, and I now need to define the type for each token separately.
I would like to know if, in version 4, there is a way to define a token type globally for all tokens in the file, rather than having to define the type for each token individually. I am using .js files to structure my tokens.
For example, the transform color/hsl-4 doesn’t work as expected, and the colors are still being processed in hexadecimal format instead of HSL.
Convert it to DTCG format first (which basically means adding $ to value property key), then defining the $type property on the token group level. https://styledictionary.com/reference/utils/dtcg/#converttodtcg util might come in handy if you want to automate the first part, but automatically applying types to token group is a manual process for you since you relied on CTI structure to determine the type in v3. In theory you can also automate this with some kind of script of course
After upgrading my project to version 4, I have a question regarding the definition of token types.
In version 3, I didn’t need to specify the token type individually for each token. However, in version 4, I noticed that the transforms are now looking for the token types in a different path, and I now need to define the type for each token separately.
I would like to know if, in version 4, there is a way to define a token type globally for all tokens in the file, rather than having to define the type for each token individually. I am using .js files to structure my tokens.
For example, the transform
color/hsl-4
doesn’t work as expected, and the colors are still being processed in hexadecimal format instead of HSL.Example:
Token structure output:
The text was updated successfully, but these errors were encountered: