- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Sun, 12 Apr 2009 16:11:39 -0700
- To: robert@ocallahan.org
- CC: David Hyatt <hyatt@apple.com>, www-style <www-style@w3.org>
Robert O'Callahan wrote: > On Mon, Apr 13, 2009 at 10:44 AM, Andrew Fedoniouk > <news@terrainformatica.com <mailto:news@terrainformatica.com>> 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? > > > That does not allow the children of A and B to occupy the extra width. > The extra width can only be white space. Ah, this. But why not to use #A { width:1*; } #B { width:2*; } if you just want to distribute their widths in 1:2 proportion? Or do you want weights to be dependent from intrinsic width of elements? Something like: #A { width:max-intrinsic*; } #B { width:max-intrinsic*; } if to assume that intrinsic width is max-intrinsic indeed? > > Rob > -- > "He was pierced for our transgressions, he was crushed for our > iniquities; the punishment that brought us peace was upon him, and by > his wounds we are healed. We all, like sheep, have gone astray, each of > us has turned to his own way; and the LORD has laid on him the iniquity > of us all." [Isaiah 53:5-6] -- Andrew Fedoniouk. http://terrainformatica.com
Received on Sunday, 12 April 2009 23:12:12 UTC