andreincu / styler

Styler is a Figma plugin that provides a more efficient way to build and maintain design systems.

Home Page:https://www.figma.com/community/plugin/820660579767995949/Styler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Only 1 text style is generated from multiple items with different weights.

sampeniak opened this issue · comments

Hey Andrei, I'm opening an issue here so I can attach the .fig file so you can test and hopefully find what the issue is. Here is the .fig file: Styler Plugin Test File.zip

Example:

I have these text items:

text-5xl/leading-tight/thin
text-5xl/leading-tight/extralight
text-5xl/leading-tight/light
text-5xl/leading-tight/regular
text-5xl/leading-tight/medium
text-5xl/leading-tight/semibold
text-5xl/leading-tight/bold
text-5xl/leading-tight/extrabold
text-5xl/leading-tight/black

Clicking "Generate Styles" results in 1 text style named:
text-5xl

Additionally, each text item that was selected font weight changed to the first text item's font weight, 'thin'.

👋 Hey Sam,

Thanks for attaching the file, that makes the investigation way simpler.

So, after checking the file, I noticed that every layer has the same name text-5xl:
image

Styler creates or try to match the selected layer by its name, so if you want to create a new style for each layer, then you have to make sure the name of the layer is set properly.
In your case, most probably you or somebody else has manually renamed the text layers before changing the text characters, and that's why the layer name doesn't match the characters.

The simplest way to re-enable the auto rename of the text layers is to use the following plugin, or something similar:
https://www.figma.com/community/plugin/768671547563304036

Alternatively, you can reset the name by simply clearing the layer name (leave it blank) while renaming it, but it works only one by one.