-
Notifications
You must be signed in to change notification settings - Fork 567
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
[scss/variables] Nested token name is omitted #366
Comments
That is expected behavior, albeit not what everyone expects. What is happening is style dictionary walks down the merged object of all the source files and when it gets to an object with a One way around this is to put both 'alert' and 'alert-light' in the same object level like this:
This should still give you the names Hope this helps! |
It's true that the suggested solution does provide you with the right names in the output, but any alias/reference will fail. |
What do you mean any alias/reference will fail? This code will work:
If you give a specific example of what would fail I could provide a more concrete answer. |
Hello there.
Maybe this is the correct behavior, but I've found an issue for my project while trying to parse the following token file:
the output (variables.scss) is only:
$color-alert: #ff0000;
Maybe missing the "$color-alert-light" variable.
the config.json:
I'm running in:
Linux Ubuntu 19.04
NodeJS: v10.17.0
NPM: 6.13.1
Also I've noticed that the simple examples do add "-base" at the end of some token names, but to make it seamless with my team UI team, I would prefer to keep the names "color-alert" and "color-alert-light"
Thanks in advance =)
The text was updated successfully, but these errors were encountered: