Re: [csswg-drafts] [css-grid-3][Masonry] repeat(auto-fill) and minmax() (#12573)

Note that `auto` is intended, under the Grid 1/2 model, to be identical to `minmax(auto, auto)` (and the same for all intrinsic keywords). So, since we want to allow intrinsic keywords in `repeat(..., auto)` for Masonry, we need to allow `repeat(..., minmax(auto, auto))` as well, at a minimum.

We could potentially distinguish between `minmax(X, X)` and `minmax(X, Y)` if we wanted, but `minmax(auto, auto)` is already two distinct values (as the spec notes, it's nearly equivalent to `minmax(min-content, max-content)`), so I don't think there's a great reason to disallow mixed keywords.

This also affects our interpretation of `minmax(100px, auto)` in Masonry, tho. In Grid, we just ignore the intrinsic keyword, and take whichever of the two arguments is definite in order to calculate auto repetitions (so we'd use 100px here). But in Masonry we *can* estimate the size of an `auto` max, and when both the arguments are usable (definite) in Grid, we use the max value (floored by the min). So that suggests that `minmax(100px, auto)` should similarly use the heuristic `auto` max size (floored by 100px), diverging from Grid layout.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12573#issuecomment-3189316886 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 17:35:50 UTC