Re: [csswg-drafts] [css-grid-3] intrinsic track sizing algorithm for masonry can go exponential in complexity. (#10053)

Discussed with the Apple/WebKit team...

We agree that subgridded masonry within masonry can create an exponential calculation. However this only affects intrinsic track sizing, so the dangers here are limited to: intrinsically sized masonry tracks _combined with_ multiple levels of subgridded masonry nesting _combined with_ large numbers of tracks.

We don't think the cases where these calculations become unmanageable will be common:
- We expect most use cases with large numbers of tracks to use non-intrinsic track sizes.
- We don't expect deep nesting of masonry within masonry in general, and even less likely with intrinsic track sizing.

To address the "but what if concerns", we're OK with introducing a UA-defined limit on e.g. the depth of masonry subgrid items that can contribute sizing back up to the master grid. A limit like this can prevent exponential explosion, while still allowing
- A limited amount of masonry nesting with intrinsic track sizing, if needed. (We don't expect much depth is needed here here, maybe 1 or 2 levels would likely satisfy any use cases.)
- Limitless depth of subgridding with fixed-size tracks.
- Interleaving Grid and Masonry subgrids in the nesting structure, which we believe is an important use case, and which requires compatible track sizing between Grid and Masonry.


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


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

Received on Tuesday, 19 March 2024 17:55:22 UTC