Conditionally resolving references in style-dictionary v3 #1457
Unanswered
BitwiseAndrea
asked this question in
Q&A
Replies: 1 comment
-
Yeah our Type imports docs and codemods needs some love probably, sorry for that. https://styledictionary.com/reference/hooks/formats/#references-in-output-files we do support conditionally outputting references in v4 and we made quite some improvements to this topic in general in v4. E.g. not outputting references when it is unsafe to do so, and not doing it when the variable that is referenced was filtered out by a filter |
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
-
I am the lucky individual to inherit our tokens pipeline and am attempting to get valid output with references. I'm still onboarding onto the system, and am having a difficult time since we are on V3....
When i have outputReferences set to true, there are a couple cases where i get invalid css
I tried fixing this in a transform specific to over-media tokens, but the
value
field is correct / resolved already to a valid rgba field, and i'm not sure if i can hack in a conditionally resolved value in another way. Transforms seem to be mostly ignored when outputReferences is set to true.I'm ok with breaking the references in this single case but i feel icky if i edit original at all and i feel like it would break something elsewhere.
Any advice? I can't use color-mix and i don't want --light-mode-surface-0 to map to raw r g b values, i can't live with myself if i do that.
Why have i not upgraded to v4? I tried yesterday and ran into several issues
Beta Was this translation helpful? Give feedback.
All reactions