RE: [css3-grid-layout] [css3-layout] fit-content and auto sizes

minmax(min-content, max-content) ensures that a track is sized no smaller than the largest min-content measure of a grid item occupying the track, and no larger than the largest max-content measure of a grid-item occupying the track.  The "growth" from the resolved min value for a track to its max value happens while space is available in the grid, so yes that's equivalent to the fit-content formula.  We can remove the auto keyword and just use fit-content instead.

-----Original Message-----
From: fantasai [mailto:fantasai.lists@inkedblade.net] 
Sent: Monday, February 20, 2012 7:46 AM
To: www-style@w3.org
Subject: [css3-grid-layout] [css3-layout] fit-content and auto sizes

A minor grid-layout issue: 'auto' should not be a synonym for 'fit-content'.
It's a waste of a good keyword. While CSS3 has wound up introducing a few
aliases, it's something we have not had in CSS before and should be trying
to avoid.

That aside, elsewhere  'fit-content' is equivalent to
   max(min-content, min(fill-available, max-content))  // shrinkwrap formula
not to
   minmax(min-content, max-content)
Depending on any additional constraints in effect, though, this might wind
up meaning roughly the same thing. I haven't quite analyzed the algorithms
here... But for a grid element with a single track (or a template element
with a single slot), my expectation is that 'fit-content' would shrinkwrap
as defined above. Does it?

(If not, then we should use a different keyword here.)

~fantasai

Received on Monday, 20 February 2012 19:32:44 UTC