RE: 3 Microsoft margin collapsing tests (wrt float, clear and clearance)

On Wed 1/20/2010 1:56pm Gérard Talbot wrote:> 
> 
> http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_8/
> margin-collapse-018.xht
> 
> a) How come an element on which clear is set (to other than none) can have
> an effect when there is no preceding floated sibling in the test?
> 
> b) The <meta assert> of the test says:
> 
>    <meta name="assert" content="An element that has clearance applied to it
> will not collapse its top margin with its parent's bottom margin."
> />
> 
> Clearance is defined as a vertical spacing created above a margin-top's
> element when there is a (preceding) floated element. Clearance (as a
> mechanism) does not happen if there is no floated element before (in code
> order). That's my understanding and that is also what I read in section 9.5.2
> http://www.w3.org/TR/CSS21/visuren.html#flow-control
> 
> Clearance (as a vertical spacing above) is not the same, is not the equivalent
> of having the property clear set to left or right or both.
> "Clearance" and "has clear set" are not interchangeable expressions.
> 
> c) which of the following stylesheet is easier for you to understand?
> 
>        <div id="div1">
>             <div class="class1"></div>
>             <div id="test">
>                 <div id="test1"></div>
> 
>             </div>
>             <div class="class1"></div>
>         </div>
> 
> or
> 
>        <div id="containing-block">
>             <div class="ordinary-sibling"></div>
>             <div id="parent-with-margin-bottom">
>                 <div id="clear-both"></div>
>             </div>
>             <div class="ordinary-sibling"></div>
>         </div>
> 
> Which of the examples are better suited for people to review, to examine?
> 
> My conclusion is that margin-collapse-018.xht should be rejected or redone.
> 
I have completely redone margin-collpase-018.xht please take a look at it now. Hopefully it makes more sense now.

--
Thanks,
Arron Eicholz

Received on Monday, 25 January 2010 19:11:41 UTC