W3C home > Mailing lists > Public > www-style@w3.org > March 2007

[CSS21] contradiction regarding blocks with clear at the end of a block

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 29 Mar 2007 16:29:22 -0700
To: www-style@w3.org
Message-ID: <20070329232922.GA12642@ridley.dbaron.org>
contains the following text:
# When an element's own margins collapse, and that element has had
# clearance applied to it, its top margin collapses with the
# adjoining margins of subsequent siblings but that resulting margin
# does not collapse with the bottom margin of the parent block.

I believe this text was intended to ensure that clear on an empty
block at the end of its parent expands the height of that parent.

However, the definition of the height of a block in
contradicts this:
# If it has block-level children, the height is the distance between
# the top border-edge of the topmost block-level child box that
# doesn't have margins collapsed through it and the bottom
# border-edge of the bottommost block-level child box that doesn't
# have margins collapsed through it.

I think the correct fix for this problem would be to change the last
sentence of the paragraph that I quote from 10.6.3 somehow to
reflect that the height also ends at the bottom margin edge of the
bottommost child if the clause from 8.3.1 quoted above is being

If we don't make this change, I believe that implementations that
pass the attached testcase (which the ones I've tested so far do)
would be nonconformant because they violate the rule in the quote
from 10.6.3 above (since the div with clear has margins collapsed
through it).


L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Thursday, 29 March 2007 23:29:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:28 UTC