[2.0]: Border tokens with hex value not being applied
From @SamIam4Hyma
RE Border Tokens not applying - non functional The border token appears as being applied in the plugin but does nothing in the Figma design panel If I go and apply a color token as the border, the color will fill with the value of the stroke width set by the border token If I change the value of the border token to 0px, the design panel does not change, even when apply to selection is ran from the plugin. I feel like this is an old bug that was solved previously and is reappearing. When I run the current build I can apply the border token no problem however adjusting the value of the border token after its applied does not adjust the figma design panel
tested as well and can confirm hex values in color dont work, but using a reference was working
Added to Featurebase Roadmap as a known issue potentially impacting beta testing performance- ❖ 🚧 ❇️ Variables in stroke weight and opacity
So I ran some investigations on this.
the setColorValuesOnTarget function expects a token value.
In this PR - I tried adding a failover, if we can't resolve a token value, it's probably a raw value, and therefore we should just apply it. This seemed to work, when there was already some token data on the node to do with border properties.
It looks like we send two messages when applying a border token. One to set the borderColor, and another to set the stroke properties (width, side, style)
I think those two messages may be clashing with each other - and causing the border colour to be removed.