- 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>
http://www.w3.org/TR/2006/WD-CSS21-20061106/box.html#collapsing-margins 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 http://www.w3.org/TR/2006/WD-CSS21-20061106/visudet.html#normal-block 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 applied. 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). -David -- L. David Baron <URL: http://dbaron.org/ > Technical Lead, Layout & CSS, Mozilla Corporation
Attachments
- text/html attachment: clear-empty-block.html
Received on Thursday, 29 March 2007 23:29:31 UTC