W3C home > Mailing lists > Public > www-style@w3.org > September 2009

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

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Tue, 15 Sep 2009 23:21:39 -0700
Message-ID: <4AB083F3.9040400@terrainformatica.com>
To: Brad Kemper <brad.kemper@gmail.com>
CC: Bert Bos <bert@w3.org>, www-style@w3.org
Brad Kemper wrote:
> On Sep 15, 2009, at 7:49 PM, Andrew Fedoniouk wrote:
>>> 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.
> I don't think that would work consistently though, would it?
> The words of the paragraph could be half the width of the available 
> space, and thus would not fit two on the same line with a space between 
> them. If that was the case, then 0.7* would not shrink to fit, would it? 
> And if you did 0.5* instead, then you would have smaller words wrapping 
> to the next line when they didn't need to.

As far as I understand notation used by Bert this will be laid out as:

A paragraph of text that
doesn't fit on one line.

A paragraph of
text that doesn't
fit on one line.

In this particular case only 'width' is competing for free
space distribution so 0.5* means that half of free space will be
left undistributed.

But if you will declare

p {

You will see this picture:

               A paragraph of
               text that doesn't
               fit on one line.

and the whole horizontal space in container
will be distributed between padding-left and
width. If space and constraints like:
   min-width: min-content;
   max-width: max-content;
will allow then left padding and width will be equal
to 50% of container.

That if I understand properly what that "fit and then
shrink more" idea actually means.

Andrew Fedoniouk.

Received on Wednesday, 16 September 2009 06:22:22 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:39 UTC