Description
According to https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-length-percentage,
If the size of the grid container depends on the size of its tracks, then the
<percentage>
must be treated asauto
, for the purpose of calculating the intrinsic sizes of the grid container and then resolve against that resulting grid container size for the purpose of laying out the grid and its items.
But what if the indefinite percentage is inside fit-content()
? https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-fit-content doesn't explain this explicitly, and it can't just be treated as auto
like in <length-percentage>
because fit-content(auto)
is not valid syntax.
I guess it should be treated as a normal minmax(auto, max-content)
, without the special fit-content
behavior? That would match this fit-content
description:
This is essentially calculated as the smaller of
minmax(auto, max-content)
andminmax(auto, limit)
.