[csswg-drafts] [css-gaps-1] Dropping decorations for suppressed gaps (#13754)

kbabbitt has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-gaps-1] Dropping decorations for suppressed gaps ==
In #13663 we resolved that, when varying gap decorations are assigned to a wrapping flex container, decorations are assigned to gaps in "linear" fashion, such that the sequence continues from one flex line to the next. An open question from that discussion is what to do with the decoration that would have appeared next to the last item in a flex line. Does that decoration get dropped from the sequence, or does it get assigned to the first gap in the following line?

One use case @fantasai brought up was a toolbar with varying decorations to separate items into groups. I constructed a straw example here: https://codepen.io/kevinbcmu/pen/ogzdvgE

<img width="2381" height="230" alt="Image" src="https://github.com/user-attachments/assets/c8771ae1-90d7-4768-b67d-fb6f433ecf89" />

In my opinion, it's a little clunky to do this with gap decorations, because you have to keep your markup structure in sync with your decoration sequence. But I can't think of a better way to do it with the tools we currently have. I agree it's a case where dropping the decoration is what the author wants, and I haven't been able to come up with a plausible use case for not dropping it.

The other case where I think we'd want to drop a decoration is a gap suppressed due to fragmentation. Consider this example: https://codepen.io/kevinbcmu/pen/YPyYwBQ?editors=1100

<img width="1638" height="1314" alt="Image" src="https://github.com/user-attachments/assets/c6150806-07dd-47ef-a977-45c55036e381" />

There's an auto repeater to set up dashed decorations for the intermediate rows, followed by a single value to set up solid decorations in the last row gap. If this example were fragmented on that last row gap, the author would not want the solid decoration pushed up to the preceding gap.

A third case worth considering is gaps suppressed due to collapsed tracks in grid. I've considered this a bit but haven't yet been able to construct a use case that points in one direction or the other.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13754 using your GitHub account


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

Received on Wednesday, 1 April 2026 15:55:49 UTC