Make id for styles editable by plugins (not read-only)

Hey,

there are many plugins that work with, control and create styles, for example all the design token plugins.

An issue all of those plugins face is, that the ids of styles are automatically created and can not be defined by the plugin.

Problem 1: The only way to update a style is to find it by name and replace it. However if a style was renamed it is impossible to update the correct style.

Problem 2: If the user deletes all styles and re-syncs via a plugin, all styles get new ids.

Why is this a problem at all?
Well if we have the style “red with id 123” and now we create a new style “red with id 456” figma will not know that this is the same style. All elements that were using the original style will be disconnected.

The solutions

  1. allow plugins to specify the id when creating styles
  2. provide an option that if set to true will overwrite a replace a style with the same id (if set to false it should fail silently or better with a console error or warning)
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.