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
[Question] Is there a way to have a value for a token that will also have nested values? #716
Comments
nevermind, I've found the previous issues that mention this, and I second the 4.0 feature requests :) |
You can do this if you changed 'DEFAULT' to a special or space character like '@' or '_': color: {
text: {
body: {
_: { value: 'green'},
on: {
dark: { value: 'blue' },
'dark-accent': { value: 'pink' }
}
}
}
} |
oh cool! so it'll just get "ignored" when translated through the various transforms? |
It won't get ignored, but the way the name transforms work is they use a string formatting method like in the change-case package which trims starting and trailing characters like that, so "color-red-" becomes "colorRed" or "color_red" etc. |
What I'd really like to be able to do if possible is set a "default" prop that wont result in an addition to the token name but still allows to created nested variations in the same file/config.
Lets say I have config like the following:
It would be really cool if the names that end up getting created are something like:
Is there any way to accomplish this kind of config?
Thanks!
The text was updated successfully, but these errors were encountered: