You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the token.original.$value property, but not the shadow tokens.
We logged the token.original.$value property of those shadow tokens within a preprocessor, a transform and a format hook:
Preprocessor hook: the references are still there.
Transform & Format hook: the references are resolved in the 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 use expand (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 format css/variables.
Not sure if this is happening intentionally or if it is a bug, but at least it feels wrong to us.
The text was updated successfully, but these errors were encountered:
oliverschuerch
changed the title
Resolved references in output, as soon as expand is true
Resolved references in output, as soon as expand is defined
Aug 26, 2024
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 format
css/variables
.Not sure if this is happening intentionally or if it is a bug, but at least it feels wrong to us.
The text was updated successfully, but these errors were encountered: