Typography Token Reference Mode Update Bug
Bug Report: Typography Token Reference Mode Behavior
When exporting Typography tokens as styles using variable references in reference mode, changing a reference does not automatically update the composite style properties, unlike in input mode where changes reflect immediately.
Steps to Reproduce:
- Create a typography token in
referencemode. - Export it as a style with variable references.
- Change the reference from
baseTypography.copy.default.mobiletobaseTypography.copy.default.desktop.
Expected Behavior:
The composite style should automatically update its text-style properties when the reference is changed in reference mode.
Actual Behavior: Changing the reference does not trigger an automatic update in the composite style properties.
Additional Context:
This behavior differs from the input mode, where updates are immediate, leading to confusion among users about expected functionality in reference mode. Users may not want real-time changes to trigger library publishing notifications.
Slack thread: https://hyma-team.slack.com/archives/C04V8U8UH0F/p1744116543761109?thread_ts=1744116543.761109&cid=C04V8U8UH0F
Attachments
📷 Image attachment: CleanShot 2025-04-09 at [email protected] (PNG, 706 KB)
📷 Image attachment: CleanShot 2025-04-09 at [email protected] (PNG, 672 KB)
📷 Image attachment: CleanShot 2025-04-09 at 19.22.47.gif (GIF, 641 KB)
Show all messages
keegan wrote: Hey, so currently when one has exported Typography tokens as styles with variable references - using the `input` and not `reference` mode - changing any value automatically updates the value in the composite style with the `Update Figma Styles on apply` checked. Is the same however expected even in reference mode? So if I change the reference from `baseTypography.copy.default.mobile` to `baseTypography.copy.default.desktop`, should the composite style change references as well?sam wrote: Can I get a visual on this? My early morning brain is struggling to untangle this puzzle.
keegan wrote: So right now if I have a typography token with input-mode, and have the style exported with variable references, changing any of the tokens also automatically updates the text-style properties.
keegan wrote: So my question is if the same is expected when using the typography token in reference-mode. That it updates the text-style properties when you change the reference
sam wrote: Is input-mode a technical term I somehow was not aware of? Are you talking about the token set status? I assume so because that would be related to reference mode.
In the past, I recall needing to take action without the styles updating unless my settings were configured to "update on change" regardless of what the Token Set status was.
I think the automatic changes without the setting is what is different now.
I'm not sure automatic changes without a setting is desired. If I'm working at an agency or managing a very complex system, I may want to be sure the work I do in the plugin isn't changing those styles in real time, triggering a library publishing notification every time I am maintaining my system.
I could be misunderstanding the problem here though.
keegan wrote: In the typography token you have an input and reference mode. Input is where you can enter atomic tokens and reference is when you can reference another typography token
sam wrote: Oh! Now I get it! There are other token types with this (boxShadow), does it behave the same way?
keegan wrote: Yes
sam wrote: So all composite token types tied to styles are updating automatically when the values are set with individual properties (that may or may not reference another token).
The behaviour is not the same when the value references another composite token.
Is that right?
p.s. I would not expect this behaviour. It's confusing to me and I'm a power user.
keegan wrote: @six.jan thoughts?
six.jan wrote: @issue_assistant create issue in tokens-studio/figma-plugin