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

On Monday 20 February 2012 20:31:55 Phil Cupp wrote:
> 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 []
> Sent: Monday, February 20, 2012 7:46 AM
> To:
> 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.)

I think that using 'fit-content' to mean 'minmax(min-content, max-
content)' was not such a good idea, when we want it to mean something 
else in the Box module.

If I remember correctly, 'fit-content' is allowed in the Template 
module, because, if 'min-content' and 'max-content' are valid then you 
would expect the third new keyword from the Box module to also be valid 
in some way.

But 'minmax(min-content, max-content)' is useful enough to give it a 
short name. I think we can drop 'fit-content' and just call it 'auto'.

  Bert Bos                                ( W 3 C )                               W3C/ERCIM                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Thursday, 1 March 2012 23:24:14 UTC