I've noticed that in every vector drawing program I've used, the options to place strokes 'inside' or 'outside' are disabled when a path is open (or on text). I assume there is a reason for this, but it makes mimicking CSS hard to do, as borders are never in the 'center' of a line segment.

Can someone explain why this is, and if there is a workaround to have a 3 sided shape with the stroke in the inside of the anchor points. Think a "tab shape" that is open at the bottom. It seems to me that if you can still "fill" an open shape, you should also be able to control the border position.

  • I'm not sure the fact that vector drawing programs can't replicate parts of CSS rendering is really a graphic design question. Here's my best guess tho: Handling the path ends would be messy. What would an offset path with a round-cap look like? Would it look different than just using the offset tool? Of course, you can use the variable-width tool in Illustrator to remove half of a path's profile, and put whatever cap you'd like on it. Oct 8, 2015 at 14:27
  • why are you trying to emulate CSS? Regardless, the reason there you can't do this with an open path is because an open path has no 'inside' v. 'outside'. Only closed paths do.
    – DA01
    Oct 8, 2015 at 19:18

2 Answers 2


If a path is not closed, can it be said to have an inside?

Or more specifically, can a naive algorithm optimized for speed reliably determine the inside of an arbitrarily-shaped open path?

It seems to me that for open paths, "left" and "right" (with node1-node2 determining vector) would be useful and the more general case. Sadly, this does not seem to have been incorporated into Illustrator.

  • Sure it can be the clockwise side of the path from first point to last (The points need to be stored in a order so they need to have a first point.
    – joojaa
    Oct 8, 2015 at 15:26

What is outside of a open path? What is inside? Open paths do not have a very well defined outside and inside. Anyway mimicking css is not in the highest priority agenda in these apps.

Theres no reason why we could not define a inside and outside for open paths. Its just that most users would, possibly, find it confusing. Atleast I usualy get blank stares when I propose that a curve has direction. So yes this is technically possible, one could allways offset outside on the clockwise side of the path observed from path beginning. The path would arbitrarily flip in Illustrator though as appending the path flips the direction. But this is just a app feature it wouldnt need to do this. It could be done, it would be useful yes.

There are more easier ways to emulate css though. Its possibld to make a css box emulator directly. These exist ive seen it some for illustrator.

  • emulator = jsx script/add-on?
    – Yorik
    Oct 8, 2015 at 15:28
  • @Yorik something like this, quick and drity hack ;)
    – joojaa
    Oct 8, 2015 at 15:57
  • I'm mostly referring to Sketch, since it's built as a web and app layout program. And I agree, finding the "inside" of a path that isn't closed is tricky, but I would say that it's whatever direction the fill is in. If I can fill an open path, I should be able to move a stroke to either side of it. It appears from these answers that it is certainly possible, just not desired?
    – ktomasso
    Oct 9, 2015 at 14:37
  • @ktomasso i wouldn't say its not desired but nobody has thought about this need. Adding little used features to applications is bad for the people who depend on those features. They will get neglected and broken, then remove when you depend on them most. You get into thsi kind of group thinking after a while and what you have done must be the way it has to work.
    – joojaa
    Oct 9, 2015 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.