figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

Unexpected behavior on creating variables modes from tokens which have modifiers

Open esthercheran opened this issue 1 year ago • 2 comments

When creating variables from tokens that have modifiers, the result is not as expected.

Image

Image

Steps to recreate:

  1. Create a set (core) with two tokens: orange and blue
  2. Create another set (mode/brand-a-light). Create a token (primary.500), use blue as reference.
  3. Create a token primary.100 use primary.500 as reference and modify using lighten. Create primary.600 and use primary.500 as reference and modify using darken.
  4. Create a new set (mode/brand-b-light). Create a token (primary.500), use orange as reference.
  5. Create a token primary.100 use primary.500 as reference and modify using lighten. Create primary.600 and use primary.500 as reference and modify using darken.
  6. Create themes:
    • Core/default : core set
    • Theme/brand-a-light: brand-a-light set
    • Theme/brand-b-light: brand-b-light set
  7. Create variables. The result is in brand-a-light only primary.500 has the correct value, primary.100 and primary.600 has values from brand-b-light.

Expected outcome: The variables should have the correct values in both the modes.

Figma file with tokens: https://www.figma.com/file/wVwtA4yOvmbg9KVskyWOZw/Issue-%232502?type=design&node-id=0%3A1&mode=design&t=ydBlyZTk7gdoNqti-1

esthercheran avatar Feb 09 '24 13:02 esthercheran

I'm also having this. On "create variables", color modifier is using "active" or "default" mode of given color reference. It gets fixed on "sync variables". So I have to run "sync variables" every time after "create variables".

ozgurgunes avatar Feb 26 '24 12:02 ozgurgunes

@esthercheran I'm getting good results with V2 beta build, can you check as well and if it's solved please close? (:

SamIam4Hyma avatar Apr 13 '24 18:04 SamIam4Hyma

@SamIam4Hyma is correct. Closing this ticket as it the bug is no longer reproducible after testing it on Prod 1.38.9 and Beta V2-rc5. CleanShot 2024-05-14 at 19 05 36@2x

keeganedwin avatar May 14 '24 13:05 keeganedwin