Skip to content

Commit

Permalink
[giow] (3) Define margin collapsing quirk in more detail.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=15993
Affected topics: Rendering

git-svn-id: http://svn.whatwg.org/webapps@7924 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 6, 2013
1 parent fd59d52 commit c9cef5b
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 46 deletions.
61 changes: 44 additions & 17 deletions complete.html
Expand Up @@ -1319,9 +1319,10 @@ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 6 June 2013</h2>
<li><a href=#sections-and-headings><span class=secno>14.3.7 </span>Sections and headings</a></li>
<li><a href=#lists><span class=secno>14.3.8 </span>Lists</a></li>
<li><a href=#tables><span class=secno>14.3.9 </span>Tables</a></li>
<li><a href=#form-controls><span class=secno>14.3.10 </span>Form controls</a></li>
<li><a href=#the-hr-element-0><span class=secno>14.3.11 </span>The <code>hr</code> element</a></li>
<li><a href=#the-fieldset-element-0><span class=secno>14.3.12 </span>The <code>fieldset</code> element</a></ol></li>
<li><a href=#margin-collapsing-quirks><span class=secno>14.3.10 </span>Margin collapsing quirks</a></li>
<li><a href=#form-controls><span class=secno>14.3.11 </span>Form controls</a></li>
<li><a href=#the-hr-element-0><span class=secno>14.3.12 </span>The <code>hr</code> element</a></li>
<li><a href=#the-fieldset-element-0><span class=secno>14.3.13 </span>The <code>fieldset</code> element</a></ol></li>
<li><a href=#replaced-elements><span class=secno>14.4 </span>Replaced elements</a>
<ol>
<li><a href=#embedded-content-2><span class=secno>14.4.1 </span>Embedded content</a></li>
Expand Down Expand Up @@ -92943,12 +92944,7 @@ <h4 id=the-page><span class=secno>14.3.2 </span>The page</h4>
<td>'hidden'
<tr><td><code title="">auto</code>
<td>'auto'
</table><hr><p>When a <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>,
vertical margins on <a href=#html-elements>HTML elements</a> at the top or bottom
of <code><a href=#the-body-element>body</a></code> elements are expected to be collapsed to
zero.</p>

<hr><p>When a <code><a href=#the-body-element>body</a></code> element has a <code title=attr-background><a href=#attr-background>background</a></code> attribute set to a
</table><hr><p>When a <code><a href=#the-body-element>body</a></code> element has a <code title=attr-background><a href=#attr-background>background</a></code> attribute set to a
non-empty value, the new value is expected to be <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the element, and
if this is successful, the user agent is expected to treat the
attribute as a <a href=#presentational-hints title="presentational hints">presentational
Expand Down Expand Up @@ -93865,11 +93861,6 @@ <h4 id=tables><span class=secno>14.3.9 </span>Tables</h4>
to the dimension property">map to the dimension property</a> 'width'
on the element.</p>

<p>When a <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>,
vertical margins on <a href=#html-elements>HTML elements</a> at the top or bottom
of <code><a href=#the-td-element>td</a></code> or <code><a href=#the-th-element>th</a></code> elements are expected to be
collapsed to zero.</p>

<hr><p>The <code><a href=#the-caption-element>caption</a></code> element unless specified otherwise
below, and the <code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-tbody-element>tbody</a></code>,
<code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-td-element>td</a></code>, and
Expand Down Expand Up @@ -93971,7 +93962,43 @@ <h4 id=tables><span class=secno>14.3.9 </span>Tables</h4>
activating the elements will cause the table to be sorted.</p>


<h4 id=form-controls><span class=secno>14.3.10 </span>Form controls</h4>
<h4 id=margin-collapsing-quirks><span class=secno>14.3.10 </span>Margin collapsing quirks</h4>

<p>A node is <dfn id=concept-rendering-substantial title=concept-rendering-substantial>substantial</dfn> if it is a text node
that is not <a href=#inter-element-whitespace>inter-element whitespace</a>, or if it is an element node.</p>

<p>A node is <dfn id=concept-rendering-blank title=concept-rendering-blank>blank</dfn> if it is an element that contains no
<a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> nodes.</p>

<p>The <dfn id=concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>elements with default margins</dfn>
are the following elements: <code><a href=#the-blockquote-element>blockquote</a></code>, <code><a href=#dir>dir</a></code>, <code><a href=#the-dl-element>dl</a></code>,
<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h4</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>,
<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>, <code><a href=#listing>listing</a></code>, <code><a href=#the-menu-element>menu</a></code>, <code><a href=#multicol>multicol</a></code>, <code><a href=#the-ol-element>ol</a></code>,
<code><a href=#the-p-element>p</a></code>, <code><a href=#plaintext>plaintext</a></code>, <code><a href=#the-pre-element>pre</a></code>, <code><a href=#the-ul-element>ul</a></code>, <code><a href=#xmp>xmp</a></code></p>

<p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
with default margins</a> that is the child of a <code><a href=#the-body-element>body</a></code>, <code>td<code>, or
<code><a href=#the-th-element>th</a></code> element and has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a>
previous siblings is expected to have a user-agent level style sheet rule that sets its
'margin-top' property to zero.</code></code></p>

<p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
with default margins</a> that is the child of a <code><a href=#the-body-element>body</a></code>, <code>td<code>, or
<code><a href=#the-th-element>th</a></code> element, has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a>
previous siblings, and is <a href=#concept-rendering-blank title=concept-rendering-blank>blank</a>, is expected to have
a user-agent level style sheet rule that sets its 'margin-bottom' property to zero also.</code></code></p>

<p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
with default margins</a> that is the child of a <code>td<code> or <code><a href=#the-th-element>th</a></code> element, has
no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> following siblings, and is <a href=#concept-rendering-blank title=concept-rendering-blank>blank</a>, is expected to have a user-agent level style sheet
rule that sets its 'margin-top' property to zero.</code></code></p>

<p>In <a href=#quirks-mode>quirks mode</a>, any <code><a href=#the-p-element>p</a></code> element that is the child of a <code>td<code>
or <code><a href=#the-th-element>th</a></code> element and has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> following siblings, is expected to have a
user-agent level style sheet rule that sets its 'margin-bottom' property to zero.</code></code></p>


<h4 id=form-controls><span class=secno>14.3.11 </span>Form controls</h4>

<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);

Expand All @@ -93997,7 +94024,7 @@ <h4 id=form-controls><span class=secno>14.3.10 </span>Form controls</h4>



<h4 id=the-hr-element-0><span class=secno>14.3.11 </span>The <code><a href=#the-hr-element>hr</a></code> element</h4>
<h4 id=the-hr-element-0><span class=secno>14.3.12 </span>The <code><a href=#the-hr-element>hr</a></code> element</h4>

<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);

Expand Down Expand Up @@ -94047,7 +94074,7 @@ <h4 id=the-hr-element-0><span class=secno>14.3.11 </span>The <code><a href=#the-



<h4 id=the-fieldset-element-0><span class=secno>14.3.12 </span>The <code><a href=#the-fieldset-element>fieldset</a></code> element</h4>
<h4 id=the-fieldset-element-0><span class=secno>14.3.13 </span>The <code><a href=#the-fieldset-element>fieldset</a></code> element</h4>

<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);

Expand Down
61 changes: 44 additions & 17 deletions index
Expand Up @@ -1319,9 +1319,10 @@
<li><a href=#sections-and-headings><span class=secno>14.3.7 </span>Sections and headings</a></li>
<li><a href=#lists><span class=secno>14.3.8 </span>Lists</a></li>
<li><a href=#tables><span class=secno>14.3.9 </span>Tables</a></li>
<li><a href=#form-controls><span class=secno>14.3.10 </span>Form controls</a></li>
<li><a href=#the-hr-element-0><span class=secno>14.3.11 </span>The <code>hr</code> element</a></li>
<li><a href=#the-fieldset-element-0><span class=secno>14.3.12 </span>The <code>fieldset</code> element</a></ol></li>
<li><a href=#margin-collapsing-quirks><span class=secno>14.3.10 </span>Margin collapsing quirks</a></li>
<li><a href=#form-controls><span class=secno>14.3.11 </span>Form controls</a></li>
<li><a href=#the-hr-element-0><span class=secno>14.3.12 </span>The <code>hr</code> element</a></li>
<li><a href=#the-fieldset-element-0><span class=secno>14.3.13 </span>The <code>fieldset</code> element</a></ol></li>
<li><a href=#replaced-elements><span class=secno>14.4 </span>Replaced elements</a>
<ol>
<li><a href=#embedded-content-2><span class=secno>14.4.1 </span>Embedded content</a></li>
Expand Down Expand Up @@ -92943,12 +92944,7 @@ html, body { display: block; }</pre>
<td>'hidden'
<tr><td><code title="">auto</code>
<td>'auto'
</table><hr><p>When a <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>,
vertical margins on <a href=#html-elements>HTML elements</a> at the top or bottom
of <code><a href=#the-body-element>body</a></code> elements are expected to be collapsed to
zero.</p>

<hr><p>When a <code><a href=#the-body-element>body</a></code> element has a <code title=attr-background><a href=#attr-background>background</a></code> attribute set to a
</table><hr><p>When a <code><a href=#the-body-element>body</a></code> element has a <code title=attr-background><a href=#attr-background>background</a></code> attribute set to a
non-empty value, the new value is expected to be <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the element, and
if this is successful, the user agent is expected to treat the
attribute as a <a href=#presentational-hints title="presentational hints">presentational
Expand Down Expand Up @@ -93865,11 +93861,6 @@ table {
to the dimension property">map to the dimension property</a> 'width'
on the element.</p>

<p>When a <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>,
vertical margins on <a href=#html-elements>HTML elements</a> at the top or bottom
of <code><a href=#the-td-element>td</a></code> or <code><a href=#the-th-element>th</a></code> elements are expected to be
collapsed to zero.</p>

<hr><p>The <code><a href=#the-caption-element>caption</a></code> element unless specified otherwise
below, and the <code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-tbody-element>tbody</a></code>,
<code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-td-element>td</a></code>, and
Expand Down Expand Up @@ -93971,7 +93962,43 @@ table {
activating the elements will cause the table to be sorted.</p>


<h4 id=form-controls><span class=secno>14.3.10 </span>Form controls</h4>
<h4 id=margin-collapsing-quirks><span class=secno>14.3.10 </span>Margin collapsing quirks</h4>

<p>A node is <dfn id=concept-rendering-substantial title=concept-rendering-substantial>substantial</dfn> if it is a text node
that is not <a href=#inter-element-whitespace>inter-element whitespace</a>, or if it is an element node.</p>

<p>A node is <dfn id=concept-rendering-blank title=concept-rendering-blank>blank</dfn> if it is an element that contains no
<a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> nodes.</p>

<p>The <dfn id=concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>elements with default margins</dfn>
are the following elements: <code><a href=#the-blockquote-element>blockquote</a></code>, <code><a href=#dir>dir</a></code>, <code><a href=#the-dl-element>dl</a></code>,
<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h4</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>,
<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>, <code><a href=#listing>listing</a></code>, <code><a href=#the-menu-element>menu</a></code>, <code><a href=#multicol>multicol</a></code>, <code><a href=#the-ol-element>ol</a></code>,
<code><a href=#the-p-element>p</a></code>, <code><a href=#plaintext>plaintext</a></code>, <code><a href=#the-pre-element>pre</a></code>, <code><a href=#the-ul-element>ul</a></code>, <code><a href=#xmp>xmp</a></code></p>

<p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
with default margins</a> that is the child of a <code><a href=#the-body-element>body</a></code>, <code>td<code>, or
<code><a href=#the-th-element>th</a></code> element and has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a>
previous siblings is expected to have a user-agent level style sheet rule that sets its
'margin-top' property to zero.</code></code></p>

<p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
with default margins</a> that is the child of a <code><a href=#the-body-element>body</a></code>, <code>td<code>, or
<code><a href=#the-th-element>th</a></code> element, has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a>
previous siblings, and is <a href=#concept-rendering-blank title=concept-rendering-blank>blank</a>, is expected to have
a user-agent level style sheet rule that sets its 'margin-bottom' property to zero also.</code></code></p>

<p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
with default margins</a> that is the child of a <code>td<code> or <code><a href=#the-th-element>th</a></code> element, has
no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> following siblings, and is <a href=#concept-rendering-blank title=concept-rendering-blank>blank</a>, is expected to have a user-agent level style sheet
rule that sets its 'margin-top' property to zero.</code></code></p>

<p>In <a href=#quirks-mode>quirks mode</a>, any <code><a href=#the-p-element>p</a></code> element that is the child of a <code>td<code>
or <code><a href=#the-th-element>th</a></code> element and has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> following siblings, is expected to have a
user-agent level style sheet rule that sets its 'margin-bottom' property to zero.</code></code></p>


<h4 id=form-controls><span class=secno>14.3.11 </span>Form controls</h4>

<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);

Expand All @@ -93997,7 +94024,7 @@ input:not([type=image]), textarea { box-sizing: border-box; }</pre>



<h4 id=the-hr-element-0><span class=secno>14.3.11 </span>The <code><a href=#the-hr-element>hr</a></code> element</h4>
<h4 id=the-hr-element-0><span class=secno>14.3.12 </span>The <code><a href=#the-hr-element>hr</a></code> element</h4>

<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);

Expand Down Expand Up @@ -94047,7 +94074,7 @@ hr[color], hr[noshade] { border-style: solid; }</pre>



<h4 id=the-fieldset-element-0><span class=secno>14.3.12 </span>The <code><a href=#the-fieldset-element>fieldset</a></code> element</h4>
<h4 id=the-fieldset-element-0><span class=secno>14.3.13 </span>The <code><a href=#the-fieldset-element>fieldset</a></code> element</h4>

<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);

Expand Down

0 comments on commit c9cef5b

Please sign in to comment.