Re: [csswg-drafts] [css-grid-2] Masonry layout (#4650)

@AmeliaBR 
> And the height of text-container items often depends on the width. But the width of a grid column can depend on the contents of that column & now we have a new circular layout concern (maximizing a column width to fit around an item can make it so that item is no longer in that column) that didn't exist in regular grid layout.

I'm afraid I don't see the problem your talking about. Grid has a _separate_ [track sizing](https://drafts.csswg.org/css-grid/#algo-content) step that runs _before_ any children are flowed. The circularity in (regular) Grid comes from having tracks in both axis which means an item's size in one axis may influence intrinsic track sizes in the other axis. That problem does not exist when you remove the tracks in one axis, as we do here in the masonry-axis.  Feel free to provide a testcase though, in case I'm misunderstanding the problem...

(In case you missed it: I'm only including the subset of items with a known placement in the grid-axis for the intrinsic track sizing step.  This step runs _before_ any children are flowed (same as in regular grid) and thus before auto-placed items are placed in the masonry case (which indeed depends on layout results), but those items don't contribute to intrinsic track sizing.)


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

Received on Saturday, 25 January 2020 01:21:58 UTC