Re: [CSS2.1] Clarifying 8.3.1 Collapsing Margins

On Wednesday 2010-09-15 01:34 -0700, fantasai wrote:
> >I think this also needs to say that 'min-height' is nonzero, but
> >that's a fix to a transitivity bug existing in the current spec.
> 
> I'd like to address that as a separate issue. I'd like to keep this
> one purely editorial.

I'm a bit comfortable deferring that (what you filed as Issue 211),
because right now the situation is that the spec has an internal
contradiction, whereas with your new wording it's explicitly defined
to the wrong behavior, because of the new text:
   | A collapsed margin is considered adjoining to another margin if
   | any of its component margins is adjoining to that margin.

If you wanted to keep it identical, you'd need to change:
 |   * The bottom margin of an in-flow block box with a
 |     'height' of 'auto' collapses with its last in-flow block-level
 |     child's bottom margin if the box has no bottom padding and
 |     no bottom border and the child's bottom margin does not collapse
 |     with a top margin that has clearance.
into:
 |   * The bottom margin of an in-flow block box with a
 |     'height' of 'auto' collapses with its last in-flow block-level
 |     child's bottom margin if the box has no bottom padding and
 |     no bottom border and the child's bottom margin does not collapse
 |     with a top margin that has clearance.  However, if the parent
 |     box has a computed 'min-height' other than '0', and the
 |     parent box's top margin collapses with the last child's
 |     bottom margin, then whether these margins collapse is
 |     undefined.

Though, strictly speaking, the old spec wasn't undefined; it was
internally contradictory.

Plus, the case where we want to change the behavior is actually
broader than the case I make undefined above.  (Remove "and the
parent box's top margin collapses with the last child's bottom
margin" to get the full case.)

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Thursday, 16 September 2010 05:52:37 UTC