-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
transform function for css/advanced
?
#91
Comments
Hey, this is an issue I still have to solve for a project as well. I was thinking that maybe this can be solved by using But I haven't tried it yet. |
I'd trust your call on this and not mine (only learned of style-dictionary a few days ago) - I didn't even know about |
Hey @kerryj89 , no it wouldn't allow you to do this. You probably want to create a custom format for that. It seems like you want to do a You need a format in which you create a duplicate of your allTokens array and replace the I think this is the easiest way. |
Hello!
Thank you for making
css/advanced
util, it looks like it'll be a huge timesaver to be able to save multiple rules to one file.Anyway, I'm trying
css/advanced
with the single token wrapper strategy.src/tokens/color/branding.json
build-token.ts
Initially I had
transform: (token: StyleDictionary.TransformedToken) => token.darkValue
under the matcher line but it seems that maybe isn't a thing with this extension.I hackishly worked around it by setting
token.value
totoken.darkValue
but this seems destructive and seems to throw the other formats that come after it off for light mode (might've misread the output though).Any tips or pointers on a better way?
Thanks!
The text was updated successfully, but these errors were encountered: