This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15745 - Margin collapsing: overflow:hidden boxes no longer self-collapse
Summary: Margin collapsing: overflow:hidden boxes no longer self-collapse
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 18:08 UTC by Anton P
Modified: 2012-12-04 00:53 UTC (History)
0 users

See Also:


Attachments

Description Anton P 2012-01-27 18:08:35 UTC
Reported by Anton Prowse

8.3.1 (Collapsing margins) says:

  # Two margins are adjoining if and only if:
  # [omitted conditions]
  # * both belong to vertically-adjacent box edges, i.e. form one of
  # the following pairs:
  # [omitted pairs]
  # - top and bottom margins of a box that does not establish
  # a new block formatting context and that has zero computed
  # 'min-height', zero or 'auto' computed 'height', and no
  # in-flow children

Since boxes with 'overflow' other than 'visible' establish block formatting contexts, they are excluded in the latter point and hence their top and bottom margins cannot collapse.  Hence the later note in 8.3.1,

  # A box's own margins collapse if the 'min-height' property is zero, and
  # it has neither top or bottom borders nor top or bottom padding, and it
  # has a 'height' of either 0 or 'auto', and it does not contain a line box,
  # and all of its in-flow children's margins (if any) collapse.

which was lifted directly from older versions of the spec, does not accurately reflect what the spec says normatively in the quoted item above.  Hence the current spec is not compatible with earlier versions; is this change intentional?

See: http://lists.w3.org/Archives/Public/www-style/2010Sep/0698.html
Comment 1 Anton P 2012-01-27 18:13:59 UTC
See also Bug 15746 which describes another conflict with the note mentioned.