-
Notifications
You must be signed in to change notification settings - Fork 580
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
How to reference with alias tokens correctly #858
Comments
Style Dictionary relies on the "value" field to know when to process and transform a design token. The architecture section in the documentation is a good read about it. https://amzn.github.io/style-dictionary/#/architecture Here's another nifty documentation on how to make sure Figma Token's outputs play well with Style Dictionary. https://github.com/apart-edgar/figma-tokens-with-style-dictionary |
Thanks for the answer! I found this: #746 yesterday and understood that Style Dictionary should work without
Did I understand this incorrectly? |
I run the token-transformer and now aliases have the right values. Thanks for this! But I still wonder what was that release info I mentioned in last message. Should reference to other token work without |
Glad it worked out! And thanks for the link - I wasn't aware of that. I just tried it and it appears to work in our implementation 😮 (we are not using Figma tokens). |
Hi!
In Figma Tokens I've used aliases to refer values of the base colors. When I do
style-dictionary build
base colors appears correctly in _variables.scss file but aliases doesn't. Alias tokens get value:[object object]
. I found that this can be fixed if instead ofColors.UI.Dark
I useColors.UI.Dark.value
. I have to manually add that key reference.value
.Why is this happening? Am I doing something wrong? How this can be fixed so Style Dictionary would identify alias tokens used in Figma Tokens?
Simplified version of the Figma Tokens file:
This is how my _variables.scss looks likea after style-dictionary build:
The text was updated successfully, but these errors were encountered: