<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>15746</bug_id>
          
          <creation_ts>2012-01-27 18:13:21 +0000</creation_ts>
          <short_desc>Margin collapsing: zero-height, zero-min-height boxes with self-collapsing children no longer themselves self-collapse</short_desc>
          <delta_ts>2012-12-04 00:54:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>CSS Level 2</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Windows 3.1</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anton P">antonsforums</reporter>
          <assigned_to name="Bert Bos">bert</assigned_to>
          
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>63193</commentid>
    <comment_count>0</comment_count>
    <who name="Anton P">antonsforums</who>
    <bug_when>2012-01-27 18:13:21 +0000</bug_when>
    <thetext>Reported by Anton Prowse

Consider the following test case:

&lt;div style=&quot;margin:10px 0; height:0&quot;&gt;
	&lt;div style=&quot;margin:10px 0&quot;&gt;&lt;/div&gt;
&lt;/div&gt;

The parent&apos;s margins don&apos;t collapse according to the current normative rules 
concerning adjacency since the bottom margin of the child is not 
adjacent to the bottom margin of the parent.  (Specifically, in this 
situation, the child self-collapses and the resulting margin collapses 
with the parent&apos;s top margin, but this new resulting margin doesn&apos;t 
collapse with the parent&apos;s bottom margin.)

But this makes the following note found in 8.3.1 incorrect: 

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

When a box&apos;s height is 0 then the note holds only when the box has no children, whereas when its height is &apos;auto&apos; the note holds as given.

If this  change is desirable, then to resolve the conflict we could replace the item in the note with:

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

See: http://lists.w3.org/Archives/Public/www-style/2010Sep/0698.html


See also Bug 15745 which describes another conflict with the note mentioned.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>