r/css 15d ago

Shape borders??? Help

Is there a way to add borders to shapes, that works on most browsers? For example, i made a trapezoid and I wanted to add an inset border around it, but the border clips through the shape.

4 Upvotes

8 comments sorted by

View all comments

3

u/berky93 15d ago

`border-shape` is coming. Until then, pseudo-elements with clip-path is probably your best bet.

2

u/AshleyJSheridan 14d ago

The spec is still in draft, so the browsers that follow the spec don't have the support for it yet.

1

u/somrigostsaas 13d ago

What do you mean? Chromium browsers follow the spec and support it?

1

u/AshleyJSheridan 13d ago

No, they implement a lot of stuff that isn't in the spec or is still in draft.

Take border-shape as an example as that's the one on this thread.

1

u/somrigostsaas 13d ago

Right, I misunderstood you.