Re: [css3-box] a width that is a little less than 'fit-content'

Bert Bos wrote:
> Somebody asked me for a way to "shrink-wrap" a box around its content 
> that is different from the three ways we are currently planning. I 
> haven't thought about it yet, but I want to make sure it gets archived.
> 
  ...

> 
> The four intrinsic sizes would give text that looks like this:
> 
> 1) min-content:
>     <------------------------->
>     A
>     paragraph
>     of text
>     that
>     doesn't
>     fit on
>     one line.
>     <!------>
> 
> 2) max-content:
>     <------------------------->
>     A paragraph of text that doesn't fit on one line.
>     <----------------------------------------------->
> 
> 3) fit-content:
>     <------------------------->
>     A paragraph of text that
>     doesn't fit on one line.
>     <------------------------->
> 
> 4) fit and then shrink more:
>     <------------------------->
>     A paragraph of text that
>     doesn't fit on one line.
>     <---------------------->
> 
> I don't know exactly what this is supposed to do in all cases, but the 
> effect should be more or less as if the box was laid out as 
> for 'fit-content' and then shrunk more without increasing the height.
> 
> 
> 
> Bert
> 
> 

I suspect this is about flex units [1] again.

1) width: min-content;
2) width: max-content;
3) width: 1*; min-width: min-content; max-width: max-content;
4) width: 0.7*; min-width: min-content; max-width: max-content;

So your 'more' in 'fit and then shrink more' is 0.7 or 0.8 or whatever.

[1] http://www.terrainformatica.com/w3/flex-layout/flex-layout.htm



-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Wednesday, 16 September 2009 02:49:33 UTC