W3C home > Mailing lists > Public > www-style@w3.org > June 2008

Re: Publishing the flexible box model

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 06 Jun 2008 18:41:10 +0200
To: "Andrew Fedoniouk" <news@terrainformatica.com>, fantasai <fantasai.lists@inkedblade.net>
Cc: robert@ocallahan.org, dbaron@dbaron.org, www-style@w3.org
Message-ID: <op.ucb5ywcr64w2qv@annevk-t60.oslo.opera.com>

On Fri, 06 Jun 2008 18:06:24 +0200, Andrew Fedoniouk  
<news@terrainformatica.com> wrote:
>>> How do flex-units interact with collapsing margins? E.g.
>>> <div style="overflow:auto; height:500px;">
>>>   <div style="height:1*; margin:1*;">Hello</div>
>>>   <div style="height:2*; margin:2*;">Kitty</div>
>>> </div>
>>> How does that work? Allocating flex height first and then collapsing  
>>> margins means the child divs don't fill the container. But trying to  
>>> collapse margins before resolving the flex heights seems crazy.
>>  I would collapse the adjacent flex margins so that 1* collapsing with
>> 2* becomes a 2* gap. Then distribute the remaining space accordingly.
>
> Correct. margin:1* collapse in the same way as margin:1em;

What if one margin is in flex units and the other is 100px or something?


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Friday, 6 June 2008 16:41:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:07 GMT