Re: [csswg-drafts] [css-grid] Clarify how collapsed tracks affect positions of abspos elements in the presence of gaps (#10813)

I think a way to interpret it would be saying that the collapsed track should have a size of minus 1 gap. Then:

 - In general (when not collapsing), items 2 and 4 would overlap by the width of the track. Since now it's -10px, they are separated by 10px instead of overlapping.
 - The end position of item 2 is: 100px (1st col) + 10px (gap) -10px (2nd col) = 100px.
 - The start position of item 3 is: 100px (1st col) + 10px (gap) -10px (2nd col) + 10px (gap) = 110px.
 - The start position of item 4 is: 100px (1st col) + 10px (gap) = 110px.
 - Item 5 should then start at 110px like item 4, and end at 100px like item 2. But we floor its width to be non-negative, so Chrome would be right.

Of course this may introduce containing blocks that have a negative size, which raises the question of whether `width: calc(100% + 10px)` should be `-10px + 10px = 0px`, or whether the containing block should be floored too and then `width: calc(100% + 10px)` should be `0px + 10px = 10px`. Firefox and Chrome say the latter.


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


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

Received on Sunday, 1 September 2024 16:45:15 UTC