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

Prevent updating existing styles #8

Open
nachtfunke opened this issue Mar 3, 2022 · 2 comments
Open

Prevent updating existing styles #8

nachtfunke opened this issue Mar 3, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@nachtfunke
Copy link

Hello!

I am using this plugin in combination with Themer to create themes! The problem is that in those themes, not all the colors will actually change. The Styler plugin detects already existing styles and will rename them instead. Can I prevent that somehow? For a given selection, I would like it to just plainly create a new style from it, even if a style with exactly the same value exists already. Is that somehow possible?

@nachtfunke nachtfunke changed the title Prevent updating styles Prevent updating existing styles Mar 4, 2022
@andreincu
Copy link
Owner

👋 Hey there,

The way "Generate styles" function works right now doesn't let you create a style if a style with that name already exists.
This happens for few reasons:

  1. this function has the multi-purpose of creating, updating and renaming built in
  2. in case there are multiple styles that has the name, then there may be conflict of names and I can't see a way to make the plugin choose the desired one (without making the user selecting the style itself - which kind of beat the purpose)
  3. the only way I could think at the moment of writing the plugin was to identify the styles by naming, when I want to update it.

When I need multiple themes, but using the same style name conventions and just to overwrite them, I'm saving them as layer and detaching the styles.
You can achieve this by doing as follow

  1. Extract styles
  2. Select the layers with the styles and Detach styles
  3. Duplicate these layers (you may feel the need to organize in canvas)
  4. At this phase, you'll have 2 sets of layers with the same properties
  5. Adjust only one set, then generate styles (remember, you still have the original set which is still detached, if you need to revert, you can do it anytime).

But, last time I checked, Themer required the styles to be published, so you can take the extracted layers and move them into a new file. (1 file = 1 theme)

@nachtfunke
Copy link
Author

Hm.. that's a shame. Thanks for the reply anyway!

@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