Re: [csswg-drafts] [css-borders-4] Allow overriding single-shape `border-shape` color/width (#13506)

> On the OP question. I’m thinking the amount of extra space **depends on `border-width`** as well, so perhaps it should be expressible relative to that rather than in absolute values only which means they need to be set together or styling breaks. Especially since `border-width` is often set externally. I’m not sure whether a multiplier is better or an additive offset, but a property that takes a `<length-percentage>` and defaults to 100% could support either. To take a stab, what about `border-area-width`? There is already precedent for the `border-area` naming from `background-clip`.

This sounds complicated. Why not let people set the actual stroke width like in other places, and have this kind of additive/multiplier thing in `calc` if they're after something like that.
 
> IMO either we should fully lean in to either borders as a mental model OR strokes. I’m worried we're creating a confused hybrid that will be internally inconsistent, and where properties that conceptually _should_ work (i.e. they have meaning), don’t for reasons that make no sense to users.

The single-path border shape is essentially "uniformly stroke this border". It's still a shape but we can say that it's essentially an empty fill and we stroke the outside of it, and we can say that any other border can also be stroked.

I did originally think that taking the border-width as the default stroke is confusing but we have resolved on that after sufficient discussion and I am reluctant to go back on it. I think it's a good *default stroke*, especially for box-like shapes and given that the shape defaults to the `half-border-box`, but we need to be able to allow something other than the default if it's less boxy - hence the OP.

In summary - I think the current model is good. A border width is a type of stroke width *in some cases* (box-like) and we need a way to override it in the other cases.

> 
> I just looked at the spec: interaction with `border-style` and `border-width` is _entirely_ undefined. We should fix this 😕

Can you elaborate? It's entirely spec'ed here: https://drafts.csswg.org/css-borders-4/#border-shape-syntax
We take the stroke width from the first side that has a `border-style` other than none.
We don't specify how the different border styles are rendered but that's also true for normal borders.

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


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

Received on Thursday, 9 July 2026 12:39:22 UTC