W3C home > Mailing lists > Public > www-style@w3.org > February 2010

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

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 3 Feb 2010 15:49:26 -0800
To: Bruno Fassino <fassino@gmail.com>
Cc: www-style <www-style@w3.org>
Message-ID: <20100203234926.GA3721@pickering.dbaron.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:24 GMT