Advertisement


How to assign different border styles in Sketch?


Question

I needed to assign different border styles for a shape, let's say rectangle. For example, I want to make a #666 1px top border and #333 2px bottom border like we do in CSS.

{
  border-top: 1px solid #666;
  border-bottom: 2px solid #333;
}

Anyone knows a practical way to do this? Any help would be appreciated.

2014/12/29
1
2
12/29/2014 9:53:00 PM

Accepted Answer

You can fake the different border styles with shadows.

For the example you posted, you can add two shadows with the following settings:

enter image description here

Here's what you will get in Sketch:

enter image description here

2014/12/31
6
12/31/2014 12:48:00 PM