Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple text styles with same name #6

Open
sverrehagen opened this issue Jun 17, 2021 · 2 comments
Open

Allow multiple text styles with same name #6

sverrehagen opened this issue Jun 17, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@sverrehagen
Copy link

As the Figma style picker is clearly showing a preview of text styles (for instance, if the style is bold, regular or italic) it is sometimes very neat to just leave them all with the same name.

I'm guessing each style is identified by som unique ID under the hood, which is why Figma itself allows multiple text styles to have the same name. I would for instance like to have three styles called Body – one regular, one bold, and one italic.

It would be nice if this plugin could also allow that, rather than merging the styles and choosing one of them.

@andreincu
Copy link
Owner

Hey,

First, thanks for taking your time to write this! 😁

You're right about the part the Figma use an unique ID to identify the layers and the styles and link those together.
But if the style is not attached to a layer, there is no way to identify it. (there is actually a more trickier one by properties and I'll look into that)

Still, the example you mentioned I don't think is doable in Figma, even natively.
Looking forward to see an actual example of achieving this natively. 🙏

For this specific use case, I'm creating the following structure which works as expected using Styler since the names are different:
Body / Regular
Body / Bold
Body / Italic

This will generate 3 styles, but will be inside a group called "Body" with 3 available styles.

Be caution, on empty spaces in the names!
The plugin will see the following names as different:

  • group / style
  • group/style

@sverrehagen
Copy link
Author

Hi again! It's definitely possible to do natively in Figma 👍

image

@andreincu andreincu added the enhancement New feature or request label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants