Responsive Design in Sketch — Part 1
With the latest version of Sketch (v.44), the group resizing feature has been updated. Even though there is no fundamental change, we have a little bit more control over the feature now.
I have written about this feature before in detail. In this article I will cover the updates and give some new tips. In the next part of this article, I will compare the group resizing feature with Anima’s Auto-layout plugin.
Shortly Group Resizing Feature
Before coming to changes, I want to explain the group resizing feature for the beginners quickly.
It’s a feature for making layers responsive to resizing of the parent group or artboard. In that way, when you resize the groups and all the layers inside would react as how they are supposed to instead of just stretching and therefore deforming.
What Has Changed?
In terms of capability, there is not much change that would make significant difference in the output. Now we have more contol over the details like pinning the layer to whatever sides you want. In the other hand, the controls might look less clear to first-time users, especially when setting up for floating and stretching modes; but no worries, figuring it out is easy!
I can say that you could do most of the things in the previous version too. Maybe it would require some hacks like using invisible layers, but still you could do. So this update shouldn’t be considered as a major advancement in the responsive design feature, this is how it was supposed to be in first place.
A Rich Example Covering Most of the Possibilities
The most important detail in this example is the gallery group in the bottom part. To accomplish this grid layout, you need to use some invisible layers in the group; otherwise, the white space between the grids would grow or shrink when the size is changed.
I made a table describing some of the cases and showing the corresponding settings in the previous version. Of course some of them wouldn’t be applicable in the previous version as you can’t select multiple options at the same time, like the fifth one.
Download the Examples
Here the Sketch file containing the examples presented in this article.
Tips & Tricks
1. Quickly Pin to All Sides
2. Resetting Group Resizing Settings
3. How to Resize Groups That Contain Text
For text changes that causes vertical growth, you can use mathematical input feature of Sketch and the line-height value of the label. Just select the group and change the height to
241 + 24 * 2 and press enter. 241 is the current height, 24 is the line-height and 2 is the new line count — yes you need to count! Sketch would calculate the result and set the group’s height to correct value.
I hope auto-resizing feature would come soon, calculating sizes manually feels outdated!
4. Exploring “Auto Layer Aligning” Feature in Symbols
There is a small additional responsive design feature in symbols to make resizing symbol instances easier. When you overwrite a text in a symbol instance, Sketch moves any of the layers located near that text layer automatically.
This feature works depending on the closeness and size of the layer. So if you’re wondering why it doesn’t work in your case, you should check these values.
It has been almost a year since the group resizing feature was introduced. It was right and necessary move. But this update is how it was supposed to be in the first place. So I was expecting a major improvement instead of just making it right but not adding very required features like: stacking, auto-resizing, layer-to-layer constraints, grids and layouts.
I think there is also something very important that Bohemian Coding hasn’t been careful enough: workflow changes. Slow and not well-thought-out updates in some key features have caused designers to find temporary unsustainable workflows. Especially in layer styles and symbol features. It’s not good to push designers and teams to set things up from scratch and re-adapt that often. I think this is really corrosive.
Summarily, I think Bohemian Coding should have a better road map and be more cautious when developing the key features. We love Sketch and we want it to be better!
What is Next?
In the next part of this article I will cover Anima’s Auto-layout plugin. It has more features and also it looks more usable. You can use them together too, so I will explain things in detail and leave the choice to you.
Follow me to stay updated and please applaud if you liked!