Re: [csswg-drafts] [css-borders-4] Interaction of single-path `border-shape` with non-uniform `border-width` (#11662)

> Sorry for the late reply!
> 
> [@noamr](https://github.com/noamr) The approach generally sounds reasonable. Though it's not totally clear to me yet how all of that plays together. Following are some inline comments:
> 
> How does that interact with the border shape?
> 
> > * Border width+color are chosen from the first non-zero border (with style different than `none`) in the order of TRBL
> > * If only one shape is given, the selected border width is used to expand the shape into two shapes like a stroke of that width.
> 
> What happened to [@smfr](https://github.com/smfr)'s / [@fantasai](https://github.com/fantasai)'s idea of using the four border triangles? Those could be used to influence both.

See lengthy discussion in this thread. There is no good way to make those triangles affect the width of the shape.
Using the 4 sides as triangles would create a lot of unexpected results, if part of the border ends up overlapping with the "wrong" triangle. I am yet to see a triangle-base demo that makes sense visually.
 
> > * If only one shape is given, the selected border width is used to expand the shape into two shapes like a stroke of that width.
> > * `half-border-box` is used as the default `geometry-box`. It is exactly in the middle between the padding and border box.
> 
> It is still unclear to me why we need a `half-border-box` value. The `<geometry-box>` is only used for percentages used within the shape, right?

Also for what `0` is. It allows you to create a percentage-based shape that expands to the border-box. This is @fantasai's suggestion from the F2F.

> 
> Related to that, the spec currently doesn't define how the border shape is actually drawn when a border width is set. I assume it is meant to expand half-inwards and half-outwards from the given shape in regard of the border width, right?

That's what I'm proposing, yes.

> 
> > * The way border styles are rendered is not spec'ed at the moment, as they are not spec'ed for normal (box) borders as well.
> 
> While it's not spec'ed _how_ they are rendered, I think we should still specify that they have to be respected. Otherwise we're not future proof, i.e. authors won't be able to know if a UA applies border styles when a border shape is set or not. (Unless we introduce an `@supports` feature keyword as resolved on in [#3559 (comment)](https://github.com/w3c/csswg-drafts/issues/3559#issuecomment-1885332213).)

I think we should say they are not respected. Most of them are not feasible with a custom shape.
But I'm also OK with leaving this bit open.


-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11662#issuecomment-3355703469 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 1 October 2025 10:29:44 UTC