Super long lines

Yeah @kirupa is right,

You can do it with the background (absolute) if:

  • Both boxes have the same parent (parent expands to content) AND the boxes are first and last child
  • OR there is one element between the 2 boxes (put image as child of the element between and use position: absolute)
  • OR all the elements between the boxes have the same height that can be calculated

This is why we need display: sub-grid

You could put all the elements between the boxes in a wrapper BUT still have them use the wrapper’s parent auto-flow and use the wrapper for the size and position of the line.

display: contents doesn’t work because it removes the box entirely from the wrapper unfortunately…

For the first time in a while its Chrome that is late to the party on a critical feature.
Even Safari is doing it…

1 Like