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: Wed, 16 Sep 2009 19:13:47 -0700
Message-ID: <4AB19B5B.8020300@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 11:21 PM, Andrew Fedoniouk wrote:
>> That if I understand properly what that "fit and then
>> shrink more" idea actually means.
> I understood it to mean: Make the text box as big as you can without 
> overflowing its parent container. This determines where the text wraps. 
> Then shrink the width of the box as much as you can without having to 
> re-wrap the text.

Ah, that...

So this is about something like width:content-outline-width

If yes then how to calculate layout of, let's say, this:

<p style="width:content-outline-width; float:left">sigma gamma</p>
<p style="width:content-outline-width; float:left">epsilon theta</p>


Such things are in principle possible only with flex units as their
calculation happens *after* layout computation using other constraints.

So this
width:*; max-width:content-outline-width;
will expand the element to fit with the constraint.

Even more: content-outline-width value is available *only*
at the moment of flex computations.

Andrew Fedoniouk.

Received on Thursday, 17 September 2009 02:14:25 UTC

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