Re: [csswg-drafts] [css-contain-2] contain:size shouldn't fragment as monolithic (#5648)

As long as size containment is used, there will be cases where people end up having both size containment and fragmentation happen together, at the very least because people occasionally print stuff. I think the behavior proposed here is strictly superior to what the spec currently says: it would allow what the spec currently says anyway, but would also allow browsers to not slice lines in cases where that's practical.

For instance, if the unfragmented box is just tall enough to fit 3 lines, and it gets fragmented in 2 equal parts, you can either put 1 line in the first and 2 in the second letting that last line overflow, and possibly overlap with subsequent content, or you can put 1.5 lines in each, slicing the second one. For that case, both approaches are bad. Depending on context, overflowing might be better than slicing, but it's not guaranteed.

However, if the unfragmented box is 3.5 lines tall or more, and the fragmentation point is 1.5 lines in, then clearly having one line in the first fragment and 2 in the second one is better: nothing is sliced, nothing overflows. Allowing that is a strict improvement.

Based on that, I'm in favor of adopting the change. It doesn't force anyone to do anything, since it's merely an allowance. 

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


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

Received on Wednesday, 16 November 2022 18:15:20 UTC