Re: [CSS21] 8.3.1 margin-bottom of 'collapsed through' box with clearance applied

On Wednesday 2010-02-03 23:42 +0100, Bruno Fassino wrote:
> In 8.3.1 :
> "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."
> 
> Only the _top margin_  of the element is explicitly mentioned. Why?

I suppose it's because we already know the bottom margin collapses,
though I agree it's rather unclear.

I think the paragraph you quote is really just an explanation of how
the earlier statement:
  # An element that has had clearance applied to it never collapses
  # its top margin with its parent block's bottom margin.
actually works.

And really, I think these statements are both just a restriction on
the statement:
  # The bottom margin of an in-flow block-level element with a
  # 'height' of 'auto' is adjoining to its last in-flow block-level
  # child's bottom margin if the element has no bottom padding or
  # border.
and things might be clearer if they were removed, and instead part
of this statement (as an additional condition).

(And really, the whole thing might be clearer if adjoining were
defined by a statement like:
  # Two margins are adjoining if and only if:
  #   * [ here insert all other statements about when margins are
  #       adjoining, reworded appropriately ]
  #   * there is a third margin adjoining both of them
.)

-David

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

Received on Wednesday, 3 February 2010 23:49:57 UTC