In my colour library “Light Theme” I have a colour style called “contentDefault” if I create a rectangle in the library, apply this style and then run
figma.currentPage.selection.fillStyleId I get the fill style ID
S:1eab1fd8b8857bf87c862afd0590934a23ac0368, (key changed).
If I run
figma.getLocalPaintStyles() I can see this same key appears as a local paint style in my library.
The library is published and up to date.
In a separate local file I have 2 different text elements and they both have the style “contentDefault” applied to them, but when I run
figma.currentPage.selection.fillStyleId they have two different values: One is
S:1eab1fd8b8857bf87c862afd0590934a23ac0368,15:73 while the other is
S:effba5ca507e1ec8b0b745807cfb2da2e0c3fcdb,2398:0. If I open the colour style selector it indicates that both of these styles are “contentDefault” and both are in the “Light theme” library and if I select “Go to style definition to edit” it takes me to the same library file. If I create a new rectangle in the local file and apply the “contentDefault” style it has the second id
This is the part where it gets weirder. If I update the library colour value and publish it, and then update the local file the text with the other fill key gets updated but not the text with the same fill key as the library.
Local fill style key “12345” is linked to library fill style key “abcde”, but local fill style “abcde” isn’t even though the key is the same.
Not really sure how this happened or how they are being synced currently.