Shea Levy
Shea Levy

Reputation: 5415

Solid two-color stroke

How would I create a path/rect with a two-color stroke? E.g. if the stroke-width is 2px, I want the outer 1px to be black and the inner 1px to be blue. Should I use gradients or patterns, or will I need to resort to some sort of hack?

Upvotes: 2

Views: 928

Answers (2)

GarethOwen
GarethOwen

Reputation: 6133

As far as I know there is no support for defining the position of the stroke with regards to the path/rect (inside, middle, outaide)

As in this this proposal: http://www.w3.org/Graphics/SVG/WG/wiki/Proposals/Stroke_position

I think you have to make two rects/paths and stroke them individually.

Upvotes: 1

Chasbeen
Chasbeen

Reputation: 1436

You could make Z's 2 piece solution a set so that it behaves and can be treated like a single Element

Upvotes: 1

Related Questions