Mobile app version of vmapp.org
Login or Join
Frith110

: Why is my Sketch-app slice 1 size unit bigger than its contents? I've made an icon which is 47 units wide. It has a border that is 3 units wide so I assume that the total is 50 units

@Frith110

Posted in: #SketchApp

I've made an icon which is 47 units wide. It has a border that is 3 units wide so I assume that the total is 50 units wide. Is my assumption wrong?

However, when I create a slice, the slice becomes 51 units wide.
Why is that, and how can I make sure my slice is as big as its contents?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Frith110

2 Comments

Sorted by latest first Latest Oldest Best

 

@Barnes313

When you set up a rectangle of 47 and give it a centered border of 3, you're going to get your overall shape out of the pixel grid, consequently taking up more than 50px


You have two options:
1. align the rectangle to subpixels (if it was at 100, 100 position, make it at 100.5, 100.5 position), so it aligns back to the pixel grid



create your icon at 50x50px and set the stroke to inner. make sure it's aligned to pixel grid. export.

10% popularity Vote Up Vote Down


 

@Moriarity648

Select your icon and change it's outline position to center then export it.It'll be exactly the size you are looking for.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme