Creating a hovered color from an existing color #1303
Unanswered
yangwooseong
asked this question in
Q&A
Replies: 3 comments
-
I think I can do this by registering a transform that applies the desired transformation to another SD object, building, and then merging the files. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am also trying to do this exact same thing. |
Beta Was this translation helpful? Give feedback.
0 replies
-
https://github.com/channel-io/bezier-react/blob/main/packages/bezier-tokens/scripts/lib/format.ts I made custom format |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to add a color to the result file that changes when hovered over a certain color. The logic that changes when hovered applies a specific formula (e.g. reduce 10% lightness).
For example, when converting a JSON file like this one
I want the resulting CSS file to look like the one below.
As far as I know, transform is a 1:1 transformation, so I can't create multiple css variables from one token. Is there any way around this. I tried to access
styleDictionary.properties
as well asstyleDictionary.tokens
like https://www.michaelmang.dev/blog/generating-design-token-theme-shades-with-style-dictionary suggests, but it was empty object. FYI, current config is https://github.com/channel-io/bezier-react/blob/main/packages/bezier-tokens/scripts/build-tokens.tsBeta Was this translation helpful? Give feedback.
All reactions