-
Notifications
You must be signed in to change notification settings - Fork 566
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 transform alias into css variables without resolving the actual value? #396
Comments
There is no way in the built-in transforms and formats, but you could write a custom one to do that (in kind of a hacky way). You could write a custom format that iterates over each token and does a check to see if |
If you build one, we would love a PR for a format that includes this! |
FYI, I've been tinkering with the solution to this started in #428 |
This is how Adobe handles aliases (keeping them intact) in Spectrum CSS. I am building a new design system for a personal project and was looking for the same functionality in Style Dictionary. If there's anything I can do to help, let me know. |
@GarthDB I have a solution for this locally. Haven't had a chance to open a PR and contribute back here. Would be happy to coordinate on that. Can we start by seeing if my solution helps you: [email protected] ? |
I have this in my PR - #428
-Tony
…On Thu, Sep 10, 2020 at 12:14 PM Garth Braithwaite ***@***.***> wrote:
This is how Adobe handles aliases (keeping them intact) in Spectrum CSS. I
am building a new design system for a personal project and was looking for
the same functionality in Style Dictionary. If there's anything I can do to
help, let me know.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#396 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQW2RTOZQXFBECE6HGN4EDSFEJQJANCNFSM4LCWD63A>
.
|
This is now possible via the merge of #504 Thanks @dbanksdesign |
Is there a way to NOT resolve alias to values, but rather transform alias into css variable names?
For example, if I have defined in my properties like so:
Is there a way to generate:
EDIT:
The reason I ask is that we want to use StoryBooks' Design Token addon which uses css variable aliases to identify when two tokens are actually the same color and display them as such:
eg: here, both
success
andpublished
areg500
The text was updated successfully, but these errors were encountered: