Case Study: Themes (or skins) in Sketch using Camilo, Part One

Ivan Korniyenko
SoftServe Design
Published in
5 min readApr 13, 2020

How to save time using auto-layout, symbol replacements and some symbol tricks

This is part one of a two-part series.

Recently I’ve been tackling a problem of creating and applying skins (or themes if you will) to Sketch documents. Skins ranging from the now ubiquitous dark mode to complete re-stylings. Here’s how I solved that problem (and ended up saving tons of time in the end):

Once upon a time, there existed skins for apps. Remember that?

The task from a client who sell B2B solutions for remote doctor visits (audio & video). Base services and experiences are then styled according to the clients’ branding and clients frequently (always) want to see and, if possible, play around with the stylized experience (I’ll call them “skins”) without coding anything.

Seems like a simple enough task, right? Just make a copy of the Sketch source, edit a bunch of symbols, tweak some styles, publish to Sketch Cloud, send to clients, make changes as per feedback, rinse, repeat.

Turns out it’s not that simple. Mobile screens and web pages are constantly added and changed to the master file (there were 250+ screens in total as I’m writing this) — so chances are that the client skin won’t match the master by the time you’re done styling.

We needed to have just one source of truth; to have the ability to store skins separately from the master; and to be able to distribute work between multiple designers.

And, obviously, do it in the least amount of clicks possible. Skeptics will call it laziness, I call it optimization.

Step One: Preparing the UI Kit

Before setting out to build out the whole service in Sketch, I had to make it in a way that would allow to create (and apply) new skins quickly and easily. Here’s how it was done:

Setting up Color

After doing research on clients currently on board and those who would join soon, I found out that most brand colors can be represented with just four layer styles: Primary, Secondary, Tertiary and Container Base (more on this below).

Four color swatches of the base product.

Text Setup

This was pretty standard — also it’s very handy to have all your text styles laid out against each other. Sadly, there’s no way to integrate color from layer styles into text styles (yet), so coloring here was done manually.

Symbols & Containers Setup

Now for the fun part. As you probably know, brand styles come in all shapes and sizes: restrained, funky, rounded, flat, skeuomorphic… You name it. There has to be a way to adapt them all without much change.

Enter Containers.

For the very base of almost all controls I used two containers: one with 100% rounding and other with 4px rounding. They were used for everything from text inputs and buttons to background layers.

For the 100% rounded container, here’s what you have to do:

  1. Create a background layer with 100% roundness (with layer style Color/Secondary)
  2. On top of it, create a border layer with 100% roundness (and create a border style Secondary)
  3. Select both layers and create a symbol from them, called Container/Rounded 100%

Repeat all of the steps above but with no rounding to have less-rounded containers (or not rounded at all — depending on the clients’ style) and call it Container/Square.

Next, I created a Button. Just create a text layer on top of the Container symbol, select them both and make a symbol out of them, like this:

Don’t forget to assign a proper text style to the caption

Assuming you’ve already created other Containers you can swap them out, while maintaining the color & border overrides, which saves tons of time while creating stylings for clients.

Don’t forget that you can have way more styles than I did — play around with it and make it your own!

There are just two symbols here. All restyling is done via overrides.
The same is done with text inputs — captioned input actually contains the no caption variation inside.

Step Two: preparing the auto layout

For this step we’re going to need Anima plugin: https://docs.animaapp.com/v1/launchpad/02-install.html

After installing, it should appear in the bottom right corner. All we’re going to need is in the first tab called Layout.

It helped tremendously in maintaining the structure of pages without having to worry how different font heights will impact paddings and vertical margins. A feature called Stack keeps paddings and alignments in pretty much any way you could ever need. Whole Post-call Feedback below is a stack set up like this:

By the way, the whole white background is a Container Base style.

Each question block is its own group. If there’s more just one question in a block, they are also grouped into stacks:

Since we can’t really know how long the text on Selector (“Very Easy”) elements, all of them are also Stacked, but this time it’s horizontal:

We must go deeper!

Such a setup allows to speed up editing or creating new pages by almost 80% — if you duplicate a Selector, it’s going to be placed next to existing ones according to stacking rules you’ve set up before. This works on all levels, starting from Selectors, going up to Questions and entire Question Blocks:

Duplicating a Selector
Duplicating an entire block

Stay tuned for part two of this series!

--

--