[URGENT] Issue with Variables in CodeGen plugin

Hi,

I work on a plugin that uses codegen to generate css code in dev mode. All the devs on the team noticed that suddenly the syntax around variables changed significantly, so I suspect yesterday’s update.

I am quite perplexed at what needs to be handled differently now as the plugin just calls codegen.on() and then uses node.getCSSAsync() to return all the CSS data from the current selection (we format it after the fact for our use case).

Since the update this is the CSS syntax we get:

Seems like every time a node uses a variable that exists in the project we get this corrupted unfinished comment block.

I need a workaround pretty urgently, so if there’s a flag to turn the comments off would be super helpful! Or any sort of other setting that will at least provide me with valid CSS syntax!

Best,
Lachezar

Yes our team is running into the same issue and has logged bug report #1180827 on this. @Alden_Lo.

Also noticed that this was mentioned in Figma’s Discord forum here…

1 Like

Hey folks, thank you for the bug report here. This issue seems to be related to some recent feature releases earlier this week, which we’ve rolled back temporarily while we investigate further. Hopefully, that should resolve the issues you’re seeing with getCSSAsync(). Sorry for the disruption!

2 Likes

Thank you for the speedy response, Jeff - this has indeed resolved the issue on our end. One last question - in the future- what’s the best way to raise any issues with the Figma dev team? Is there perhaps a better place to raise bugs/issues? I can’t seem to access the discord linked above

If you have a pro plan or above, you can file a ticket directly with support. See:

Otherwise, the forum is the probably still best place.

1 Like

I also face this problem. Please give me answer in details.