styler
styler copied to clipboard
Prevent updating existing styles
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?
👋 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:
- this function has the multi-purpose of creating, updating and renaming built in
- 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)
- 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
- Extract styles
- Select the layers with the styles and Detach styles
- Duplicate these layers (you may feel the need to organize in canvas)
- At this phase, you'll have 2 sets of layers with the same properties
- 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)
Hm.. that's a shame. Thanks for the reply anyway!