Open oliverschuerch opened 3 weeks ago
Minimal reproduction Reproducible also without any sd-transforms stuff so definitely a style dictionary bug
Seems to happen only when the expand is configured on the platform level, works fine when put on the global level. Will need to investigate this one.
In our project, we want to output references, whenever possible. But also we have to expand typography tokens.
Therefore we set
outputReferences
totrue
in our config and also useexpand
like so:We're using a custom format and filter to get the desired output and everything works fine, instead of one thing: As soon as we start implementing the
expand
property into the config (to expand only typography tokens) our shadow tokens start being outputted with resolved references. All other tokens keep their reference definitions in thetoken.original.$value
property, but not the shadow tokens.Instead of:
we would like to have the output like so:
We logged the
token.original.$value
property of those shadow tokens within a preprocessor, a transform and a format hook:token.original.$value
already and there is no chance to reformat the references anymore.As said, this does not happen if we do NOT use any
expand
config, but starts being the case if we useexpand
(no matter how we define the expand property). By the way, this happens as well, when we do not use our custom filter and format, but instead use the formatcss/variables
.Not sure if this is happening intentionally or if it is a bug, but at least it feels wrong to us.