Re: [CSS2.1] Clarifying 8.3.1 Collapsing Margins

Alan Gresley wrote:
> fantasai wrote:
>> On 09/14/2010 04:44 PM, L. David Baron wrote:
>>> On Thursday 2010-08-19 11:36 -0700, fantasai wrote:
[snip]
>>> Since we don't actually define "participate in" a block formatting
>>> context, I think it's important to also say here that neither of the
>>> boxes is the box that establishes the block formatting context.
>>
>> I would prefer to define participation in a block formatting context,
>> since the margins of boxes that establish block formatting contexts
>> can and do collapse e.g. with siblings or parents, and that makes
>> this requirement hard to word...
> [snip]
>> ~fantasai
> 
> 
> I agree with David here.
> 
> An element that itself establishes a block formatting context (a float) 
> *does not collapse* with it's parent.
> 
> Neither of the exceptions (or clauses) below seen in the prose of your 
> next message by you in this thread [1] take the above situation into 
> account.
> 
> 
>  |  * Vertical margins between a floated box and any other box do not
>  |    collapse (not even between a float and its in-flow children).
>  |  * Vertical margins of elements that establish new block formatting
>  |    contexts (such as floats and elements with 'overflow' other than
>  |    'visible') do not collapse with their in-flow children.


What I said was only very incorrect, the whole margin collapsing prose 
in the spec is usually referring to vertical margins. Also different 
properties and values that establish a block formatting context work 
in different ways. What I should have said is this.


   The top margin of a floated box does not collapse with the top
   margin of it's parent.


With the bottom margin.


   The bottom margin of a floated box does not collapse with
   the bottom margin of an ancestor if that ancestor also
   establishes a block formatting context.




-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

Received on Wednesday, 15 September 2010 13:05:28 UTC