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

Re: [CSS3] Flexible Flow Module, proposal.

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sun, 12 Apr 2009 17:44:35 -0700
Message-ID: <49E28AF3.8050206@terrainformatica.com>
To: David Hyatt <hyatt@apple.com>
CC: robert@ocallahan.org, www-style <www-style@w3.org>
David Hyatt wrote:
> On Apr 12, 2009, at 5:44 PM, Andrew Fedoniouk wrote:
> 
>> David Hyatt wrote:
>>> On Apr 12, 2009, at 5:19 PM, Robert O'Callahan wrote:
>>>>
>>>> That is not what I was asking for.
>>>>
>>>> Suppose I have elements A and B with intrinsic widths 100px and 
>>>> 200px respectively. Suppose the container has width 400px, and I 
>>>> want the extra space to be distributed equally to A and B, so they 
>>>> end up with widths 150px and 250px. Your proposal has no way to do 
>>>> this as far as I can tell, nor is it possible by setting min-widths 
>>>> or max-widths.
>>>>
>>>> This is actually the default behaviour for XUL boxes, so it seems 
>>>> important to me that any flex-box-like spec be able to do it.
>>> Yeah, I just brought this up in my last message as well.  The only 
>>> way I can see to solve this for flex units is to actually specify 
>>> both values, e.g.,
>>> width: (100px)1*
>>> or something like that....
>>
>> I am not sure I understand the problem.
>>
>> If you will define:
>>
>> #A { width:max-intrinsic; padding-left:1*; padding-right:1* }
>> #B { width:max-intrinsic; padding-left:1*; padding-right:1* }
>>
>> than widths of *border* boxes will be set in the way you want.
>>
>> Is this the answer or I've missed something?
>>
> 
> Flexing padding won't flex the content width of the boxes, which can be 
> very relevant.  If width is a value other than intrinsic for example.
> 
> #A { width: 200px; box-flex: 1; }
> 
> The object would first lay out at 200px and then it would flex to fill 
> the remaining space.  If the box's max-intrinsic width is larger than 
> 200px, then flexing will enable more content to fit in the larger 
> available width after flexing.
> 

How this

#A { width: 200px; box-flex: 1; }

is different from this:

#A { min-width: 200px; width:1*; }

?

Seems like XUL is using a concept of "preferred width" that I do not
understand. How is that "preferred width" is related to min-width, 
max-width and the width in CSS?

Or is it something different completely?


> dave
> (hyatt@apple.com)
> 
> 
> 


-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Monday, 13 April 2009 00:45:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:46:58 GMT