[csswg-drafts] [css-grid-3] Allow <auto-repeat> (i.e. repeat(auto-fill|auto-fit, ...)) to accept intrinsic sizes (#9321)

fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-grid-3] Allow <auto-repeat> (i.e. repeat(auto-fill|auto-fit, ...)) to accept intrinsic sizes ==
From @bfgeek in https://github.com/w3c/csswg-drafts/issues/9041:

> One thing that seems desirable is to allow a wider/different syntax for rows/columns than is currently allowed for grid, e.g. masonry-template: repeat(auto-fill, auto).
> (Above would measure all the masonry items, and select the best number of tracks to fit the content).
> (Arguably above might be a better default than masonry-template: auto for example).
> This isn't possible for grid-template for good reasons - but we could accept it for masonry.
> One open question is if we need different track sizes or just one would suffice. All the designs I have personally seen have just one track repeated N times. Accepting just one track template would allow easier intrinsic sizing of spanners for example.

This is behavior probably doable (and desirable!) in Grid itself. A typical use case is a grid of cards, where the size of the cards isn't known (or is awkward to know) ahead of time when writing the stylesheet. We probably want to introduce new keywords to convey the "items contribute on all tracks" aspect of it, though, so that keyword track sizes within repeat() aren't treated differently to the identical keyword track sizes outside it.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9321 using your GitHub account


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

Received on Thursday, 7 September 2023 13:58:17 UTC