-
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
Aliasing objects at levels above value #205
Comments
I think that this could be useful for inheriting dictionaries or theming. @elliotdickison might have some thoughts? |
I usually do pretty granular references for theming (e.g. button-background-color-primary: theme-background-color-accent). I haven’t thought much about object level references for theming but it would be interesting to explore what that means. Properties that I do often reference in bunches include things like border width/style/color or shadow spread/blur/offset/color. I have to admit though, since moving to js modules instead of json files I just require the properties that I need using node and merge them into new property objects with JavaScript. |
Since I am the one that raised over and over this question, I want to make clear that my problem is not that I want/need this feature, it depends on real user-needs and up to now (I agree with @elliotdickison, the only case where I needed this was for a font declaration, so family, size, line-height, etc). My main concern was that it was not clear in the documentation if this was possible, and in that case how to use it, and what to expect as a result. If there are no real/important use cases, I prefer to keep the overall complexity of Style Dictionary lower, and clearly state in the documentation that this is not allowed (so the only valid references would be to the "value"). My 2 cents. |
With the addition of #89, most use cases are likely covered by creating style dictionaries directly in javascript. In the documentation on using alias/references in JSON property files, we do say this:
Maybe we should be more clear? In any case, we aren't considering adding this functionality at this time. If you stumble upon this issue and have a use case that requires it, please open a new issue that references this one and we can look at adding it in. |
What should happen if you try to reference a whole object that contains values?
What are the problems we are trying to solve with aliasing a whole object with values in it?
(#120, #198)
The text was updated successfully, but these errors were encountered: