Re: [csswg-drafts] [css-borders] allow multiple borders (#13044)

> Remember that the border-width: 1px and the border-style: solid, solid might be cascading from different sources, each making different assumptions.
> That's a valid argument. But not a compat argument as previously stated. And I'm not convinced this is the lesser evil.

Yeah, me neither. Saying it's nonnegotiable is just a way of shutting down discussion. 

I think it is very extreme to say that we can't have lists of border widths because someone might add additional borders without considering that it would make the total of all borders wider, or that you're assumed to be using some cascaded width from somewhere else. Maybe I'm not understanding the issue, but that seems very edge case to me. And who is going to add 2 or more color stripes to a 1px border anyway? It would be far more common to want each border color to be 1px or more each. 

I would make `border-width` be the property that determines the number of borders in the list. That way you can just have a single value for `border-style`, since `border-style: solid` is going to be the most common use case by far for all the borders in a list. You would never have `none` in a list, and combining `dotted` or `dashed` with `solid` would be much less common than all solid borders. 

Something like this is what I would consider the most straightforward (and readable) way for a common sort of use case (with list starting on the innermost border):

```
border-width: 4px, 2px, 2px;
border-color: black, transparent, black;
border-style: solid;
```
Or if you prefer, in shorthand:

```
border: 4px solid black,
        2px solid transparent,
        2px solid black;
```
I wouldn't be using cascading values for anything like this. I'm changing the border to something that now has three borders, so of course I'm expecting to have to adjust the total border widths for that, even if it changes the geometry. I think it would be very unlikely to want to add borders without also wanting to change border-width to accommodate the space the extra borders would need. 

I'm not apposed to also having 1d image border colors too, but I think that is more niche. 

I also feel that listifying borders would allow more future possibilities, such as `border-offset` (like we have `outline-offset`), with multiple borders able to overlap each other in creative ways. And maybe even something like `border-filter` that works similarly to `backdrop filter`. 



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


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

Received on Tuesday, 30 December 2025 19:25:50 UTC