You have duplicate, inconsistent, and unnecessary layer styles and text styles in your design, and you know it 😊.
Even if you are the tidiest designer in the face of Earth there are several situations that may introduce duplicate and inconsistent styles to your design file. The most common are:
- You start a design based on a previous project, and all old styles are still there.
- You copied styled texts or shapes from other design files (and their styles got imported too).
- You started working on a design, creating styles, …, and some time later you realized that you should use a Sketch Library to host styles and branding stuff. And… ouch, styles are now defined in both places.
Sketch allows you to have different layer and text styles with the same name, and there’s no way to overwrite one with another.
You know what comes next. “Inconsistency” is a polite way to call it. It’s a style mess. It’s hard to manage. Hard to use. Hard to teach. Hard to prevent collaborators (or even yourself) for creating new redundant styles. It’s even hard to know which of those equally named or visually similar style you need to apply to your supercool new card component.
When importing work from anywhere else, there’s a high probability of getting duplicated styles in your own file.
But the real problem is that, after all, some of your layers and texts will be referencing the “good” style, and some others the “bad” one that look almost the same, what makes it really hard to even to notice the difference.
Some layers will be referencing the first style, and some will be referencing the second one. Boom -> Maintainability nightmare :)
It’s a really similar problem to having duplicate symbols in your files. So we decided to enhance the Merge Duplicate Symbols plugin to also fix it :)
The Merge duplicates plugin was built to merge duplicate symbols. Now it also enables you to automatically find all the name-duplicated text or layer styles within your whole Sketch file (even if those styles are coming from External Libraries) and prompt you about what to do with them.
Just run the plugin, choose the styles you want to keep, and press Merge. The style you decided to keep will be applied to all layers (and overrides) using the discarded styles, and the discarded styles will be removed (*).
(*) External libraries styles won’t get removed from their libraries.
Merge styles with same name vs. Merge styles from list
The plugin has two “flavours”:
- Merge styles with the same name will automatically scan your document for styles with the same exact name, and prompt you about what to do with those. You’ll get prompted for each duplicated style it finds, the same way the “Merge duplicate symbols” plugin works.
- Merge styles (from list) will let you select which styles you want to merge (from the whole list of styles within the document and external libraries), and merge them, even if they have different names.
Merge Duplicates is available for purchase on Gumroad.
Importing stuff from other files can easily generate a mess. This plugin will hopefully ease the process and help you keep your Sketch files clean.
That’s all, folks! Hope it helps!
Big big kudos to Invision team for this cool Atlas freebie 🤗.