Mobile app version of vmapp.org
Login or Join
Carla748

: Lists (similar to ) in Sketch 3 I love that Sketch 3 uses CSS for lots of things, such as copying styles. Is there any way to create a list of items, sorta "linked" vertically so that if

@Carla748

Posted in: #SketchApp

I love that Sketch 3 uses CSS for lots of things, such as copying styles.

Is there any way to create a list of items, sorta "linked" vertically so that if you change the padding/margin on them, they'll remain properly stacked?

In HTML & CSS this would be a list of <li> tags that you can style, where if you adjust the padding or margin height on each, they'll all remain properly stacked/spaced.

I never liked "distribute evenly" features, I'd much rather set my own padding & margins to be consistent with the rest of my design.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla748

1 Comments

Sorted by latest first Latest Oldest Best

 

@Cooney243

Found out how using the Make Grid feature. Not perfect, but maybe the best we've got in Sketch 3.

Let's say you want to make a menu, like a left side push menu.

1) Make a shape (i.e. a rectangle)
2) Select it and choose Arrange > Make Grid
3) Set Rows to 5, Margin to 0px. Columns to 1. Click Make Grid.

That will generate 5 rectangles with the same style and stack them vertically.

Then when you want to change the padding/margin on them, you can select them all, change the height of all of them at the same time in the properties panel and you'll see them start to overlap. But then, with all of them still selected, repeat steps 2 & 3 above to do the "Make Grid" again and it will re-stack them vertically.

Another tip: If you're doing a push menu, and you want single pixel borders between the items, do the steps above with a margin of -1px. Or if you just want a border-top, a great hack is to turn off the border and instead use a Shadow with X0, Y1, Blur0, Spread0. Then do the Make Grid with a margin of 1px (since the shadow takes 1px on the outside of the shape).

None of this solves for alignment of the text on top of the rectangles though, anyone know how to make this answer better?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme