All Projects → aparajita → Sketch Style Master

aparajita / Sketch Style Master

Licence: mit
Sketch plugin for renaming shared styles

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Sketch Style Master

Icondrop
Get access to 2 million+ design resources right inside Adobe Xd, Figma, Sketch, Microsoft Office, G Suite and many more.
Stars: ✭ 174 (-9.84%)
Mutual labels:  sketch-plugin, sketch
Sketch2ae
A Sketch plugin to export sketch file to Adobe After Effect
Stars: ✭ 170 (-11.92%)
Mutual labels:  sketch-plugin, sketch
Logodrop
A Sketch Plugin to get brand logos right into Sketch App.
Stars: ✭ 140 (-27.46%)
Mutual labels:  sketch-plugin, sketch
Sketch Copy Paste Position Size
A Sketch plugin that lets you easily copy & paste width, height, x & y values from and to objects
Stars: ✭ 130 (-32.64%)
Mutual labels:  sketch-plugin, sketch
Sketch Tailwind
A plugin that tries to bridge the gap between designs and code. Sketch Tailwind lets you export aspects of a design made in Sketch to a javascript theme file that you can import into your TailwindCSS config
Stars: ✭ 166 (-13.99%)
Mutual labels:  sketch-plugin, sketch
Exporter
A Sketch plugin that exports Sketch artboards into clickable HTML file.
Stars: ✭ 131 (-32.12%)
Mutual labels:  sketch-plugin, sketch
Symbol Swapper
Swap the selected symbols and/or symbol instances to a master of the same name in a library.
Stars: ✭ 179 (-7.25%)
Mutual labels:  sketch-plugin, sketch
Sketch Select
🖱 Make it much more convenient to select layers with similar attributes.
Stars: ✭ 114 (-40.93%)
Mutual labels:  sketch-plugin, sketch
Sketch Iconfont
This plugin helps you easily insert and manage icons from icon fonts.
Stars: ✭ 1,980 (+925.91%)
Mutual labels:  sketch-plugin, sketch
Sketch Palette Generator
Output a JSON colour palette to Sketch 💎
Stars: ✭ 148 (-23.32%)
Mutual labels:  sketch-plugin, sketch
Sketch Navigator
Artboard navigation (with autocomplete) for Sketch.
Stars: ✭ 161 (-16.58%)
Mutual labels:  sketch-plugin, sketch
Symbol Instance Renamer
Rename symbol instances to the name of their master.
Stars: ✭ 164 (-15.03%)
Mutual labels:  sketch-plugin, sketch
Sketch Potrace
Potrace for Sketch is a bitmap tracing plugin. It converts bitmap images into monochrome vector graphics.
Stars: ✭ 122 (-36.79%)
Mutual labels:  sketch-plugin, sketch
Sketch Batch Create Symbols
A plugin for Sketch to convert selected layers to individual symbols.
Stars: ✭ 134 (-30.57%)
Mutual labels:  sketch-plugin, sketch
Magic Buttons Sketch Plugin
Be a wizard! Automatically resize and relabel buttons with padding sizes like CSS.
Stars: ✭ 115 (-40.41%)
Mutual labels:  sketch-plugin, sketch
Fake Chinese Name For Sketch
生成随机中文人名的 Sketch 插件
Stars: ✭ 141 (-26.94%)
Mutual labels:  sketch-plugin, sketch
Kitchen
Powerful sketch plugin for design cooperation 🍳🍳🍳
Stars: ✭ 103 (-46.63%)
Mutual labels:  sketch-plugin, sketch
Overrideit Sketchplugin
Overrideit is sketch plugin that allow designers to search in overridelist and overrides dropdowns, and with many other features.
Stars: ✭ 113 (-41.45%)
Mutual labels:  sketch-plugin, sketch
Html Sketchapp
HTML to Sketch export solution
Stars: ✭ 1,811 (+838.34%)
Mutual labels:  sketch-plugin, sketch
Symbol Instance Locator
Locate all instances of a selected symbol or instance.
Stars: ✭ 150 (-22.28%)
Mutual labels:  sketch-plugin, sketch

Style Master

Let’s face it — Sketch’s style organizer leaves a lot to be desired. When you want to apply whole scale changes to your shared style names, you’re faced with endless clicking and manual renaming.

With Style Master, you can rename all or some of your shared styles at once. With the power of regular expressions, you can even completely redesign the naming hierarchy. The possibilities are limitless.

Install with Sketch Runner

With Sketch Runner, just go to the install command and search for Style Master. Runner allows you to manage plugins and do much more to speed up your workflow in Sketch. Download Runner here.

Manual Installation

  1. Go to the latest release page and download Styles Master.sketchplugin.zip.
  2. In Sketch, go to Plugins > Manage Plugins..., click on the gear icon, and select Show Plugins Folder.
  3. Un-zip the downloaded zip archive and then double-click the Style Master.sketchplugin file to install it.

Usage

Select Plugins > Style Master > Rename Text Styles or Plugins > Style Master > Rename Layer Styles to bring up the renaming dialog:

The left side of the dialog controls the renaming process, and the right side displays a live preview of how the styles will be renamed. Initially the preview columns are sized to fit the width of the longest style name (plus some extra space), and the window is sized to fit the width of the preview. You may resize the window, however note that the width of the preview columns will not change.

Note: There are key equivalents for every item in the interface.

Find field/options

Enter the text you wish to search for in the search field (big surprise!). By default, searching is case sensitive. If you want to do case-insensitive searching, check "Ignore case". As you type in the Find field, the preview dynamically updates to indicate which style names match.

By checking "Regular expression", you can specify any valid Javascript regular expression in the Find field and use a special replacement syntax in the Replace field. This allows you to perform extremely sophisticated manipulation of the style names that would extremely tedious otherwise. For examples of using regular expressions, see the Cookbook.

Note: If the regular expression is invalid (e.g. unmatched parentheses), it is displayed in red.

Replace field

The text you enter here replaces (or removes, if empty) the portion of the style name matched by the Find field. Note that all occurrences of the matching text within a given name will be replaced. So, for example, a simple search for "Sm", replacing with "Lg", would rename "Smile / Center / Sm" to "Agile / Center / Sm". This is a case where using a regular expression is useful to ensure you match only certain portions of a style name.

Note: If the Replace field is empty and the current search matches entire style names, those styles will not be included when renaming is performed, and they are not included in the rename count. These non-renameable styles are indicated by <empty> in the “After” column of the preview.

Preview info/options

Below the Find and Replace fields are items relating to the preview. The number of styles that will be renamed when the Apply or Rename buttons are clicked is displayed first, followed by options that control the preview display.

Show only matching styles

When this option is off, the preview displays all styles. This is useful when you are trying to figure out what to search for. As you type in the Find field, matching styles are displayed in bold in the "Before" column of the preview:

As you can see in the image above, "Dark" actually matched 33 styles, but only the first 5 are visible because the remaining 28 styles are much later in the style list. This is where the "Show only matching styles" option is useful. When this option is on, only matching styles are displayed in the preview:

Autoscroll to first matching style

When this option is on (the default), as you type in the Find field, the first matching style is scrolled to the top of the preview. This makes it easy to see if you are matching the right styles.

However, there may be times when you don't want the preview to scroll as you type in the Find field. For example, you may be trying to match a style name with a long regular expression and you have to scroll to see the style name. In this case, turning the "Autoscroll to first matching style" option off allows you to keep the style name visible as you type.

Preview

When the dialog first opens, the preview on the right side of the dialog displays all of your styles, sorted alphabetically (case is significant).

As you type in the Find field, matching styles are highlighted in bold in the “Before” column, with the renamed style in the “After” column. As you type in the Replace field, the renamed style names update.

Action buttons

Button Action
Cancel Closes the dialog without making any changes.
Apply Renames the matching styles without closing the dialog.
Rename Renames the matching styles and closes the dialog.

Key equivalents

Action Keys
Toggle "Ignore case" ⌘I
Toggle "Regular expression" ⌘R
Toggle "Show only matching styles" ⌘M
Toggle "Autoscroll to first matching style" ⌘S
Perform rename ⌘⇧A
Perform rename and close the dialog Return or Enter
Cancel and close the dialog Esc or ⌘. or ⌘W

Cookbook

Here are some typical tasks you might want to perform with Style Master and how to accomplish them. All of them assume the “Regular expression” option is on.

Note: A great tool for testing out regular expressions (and for explaining what the regular expressions in these examples do) can be found at regular expressions 101.


Changing the “/” style

Did you know that you can use spaces around the “/” characters used to create a hierarchy in text style, layer style, and layer names? It makes the full name much easier to read. It’s easy to do this:

Find Replace
([^ ])/([^ ]) $1 / $2

Rearrange the naming hierarchy

Let’s say you are using a template that orders the text styles in the following hierarchy:

Size (Body, H1, etc.)
  Weight (Regular, Semibold, etc.)
    Alignment (Left, Center, Right)
      Color

But you want to reverse the order of Alignment and Weight:

Size (Body, H1, etc.)
  Alignment (Left, Center, Right)
    Weight (Regular, Semibold, etc.)
      Color

Here’s how:

Find Replace
^(.+?)\s*/\s*(.+?)\s*/\s*(.+?)\s*/\s*(.+) $1 / $3 / $2 / $4

Collapsing the naming hierarchy

Let’s say you have the same hierarchy as in the example above, but instead of reordering the Alignment and Weight, you want to combine the Alignment and Color into a single level. So instead of Body / Regular / Left / Black you want Body / Regular / Left - Black. This would be a soul-crushing task if you had to do it manually with dozens of styles.

Regular expressions to the rescue!

Find Replace
^(.+?)\s*/\s*(.+?)\s*/\s*(.+?)\s*/\s*(.+) $1 / $2 / $3 - $4

Expanding the naming hierarchy

This is the opposite of collapsing the naming hierarchy. You have Body / Regular / Left - Black but you want Body / Regular / Left / Black.

Here’s how:

Find Replace
- ([^-]+)$ / $1

Acknowledgements

Special thanks to other members of the Sketch plugin community for their invaluable foundational work:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].