W3C home > Mailing lists > Public > public-css-testsuite@w3.org > November 2010

margin-collapse-157 probably invalid

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 24 Nov 2010 14:49:27 -0800
To: public-css-testsuite@w3.org
Message-ID: <20101124224927.GA11849@pickering.dbaron.org>
I think that this test:
is invalid.  As with any margin-collapsing and clear test, it's
complicated, so I might be missing something.

However, my basic logic is the following:

 * the elements with class="clear" all have:
   + clearance above them (below their top margin)
   + border below them

In the bottom row, they also contain an empty element
(class="empty") with all margins set to 1em.  The top and bottom
margins collapse with each other, but they can't collapse with
anything outside of the element with class="clear" since they can't
collapse across the clearance above or the border below.  This means
that the margins of the class="empty" element should take up 1em of
height below the aqua float (since their parent has clearance) and
above their parent's bottom border.  In this 1em of space, the red
background of the div with class="clear" should show through.

So I think Gecko's rendering is correct (but, again, I could be
missing something).

Since apparently a number of other implementations pass this test,
it should be replaced with a test checking for Gecko's rendering.
I'd suggest:
 + reducing the 4em bottom border to 3em for the last 3 tests only
 + changing the background for .clear from red to yellow
 + swapping the rows and columns in the table grid so the resulting
   size difference is clearer in implementations that currently pass


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Wednesday, 24 November 2010 22:49:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:26:52 UTC