Re: [csswg-drafts] [css-grid-3][Masonry] fit-content track size (#12609)

My guess is:
 - A `min-content` track size uses the min-content contribution of items
 - A `max-content` track size uses the max-content contribution of items
 - So to be consistent, a `fit-content` track size would use the fit-content contribution of items, but there is no such thing.

What is your idea, treating a `fit-content` track size as `min-content` when sizing the grid under a min-content constraint, treat it as `max-content` when sizing under a max-content constraint, and otherwise use the shrink-to-fit formula like `clamp(min-content contribution, available grid space, max-content contribution)`?

That's the only reasonable thing I can think of, but not sure how useful it would be to use the available grid space when there are multiple tracks. Of course we can't use the grid area size, since that's the thing that is being calculated.

Also note that adding a `fit-content` track size that relates to the `fit-content` box size would probably make people think that the `fit-content()` track size relates to the `fit-content()` box size, but that's not really the case (probably it wasn't a good idea to use the same name).

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


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

Received on Thursday, 14 August 2025 22:51:05 UTC