Replies: 1 comment 1 reply
-
Hi, if I understand correctly, you want to be able to use refrences in your tokens declarations, but not have those references output in the final CSS (custom properties). // primitives.json
{
color: {
white: {
value: '#fff',
}
}
}
// components.json
{
button: {
background: {
value: '{color.white}',
}
}
} Expected ouput: --button-background: #fff; This should be controlled by the So I guess the ouput you get is: --color-white: #fff;
--button-background: #fff; Then you will need filtering. If want to be able to "split" output files this example might help. Sadly we don't have access to the file object in filter functions at the moment, but you might not need that. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Given the following example:
I only want to output the values from the component objects. Those component objects can still refer to a semantic object (for it's current theme) or to the primitives layer. Right now i need to supply all the layers otherwise they don't know where to reference to. However this means that style-dictionary makes (in my case css variables) for every token in the file. But i just want my export to have tokens from the components. Am i missing something obvious?
Beta Was this translation helpful? Give feedback.
All reactions