HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2749

File a bug

SVNBugCommentTime (UTC)
2749Filling in the rendering section: <body> margins; administrivia2009-02-04 02:56
Index: source
===================================================================
--- source	(revision 2748)
+++ source	(revision 2749)
@@ -60928,17 +60928,18 @@
 
   <h2 id="rendering">Rendering</h2>
 
-  <p><em>This section all its subsections are non-normative.</em></p>
+  <p><em>User agents are not required present HTML documents in any
+  particular way. However, this section provides a set of suggestions
+  for rendering HTML documents that, if followed, are likely to lead
+  to a user experience that closely resembles the experience intended
+  by the documents' authors. So as to avoid confusion regarding the
+  normativity of this section, RFC2119 terms have not been used.
+  Instead, the term "expected" is used to indicate behavior that will
+  lead to this experience.</em></p>
 
 
   <h3>Introduction</h3>
 
-  <p>User agents are not required present HTML documents in any
-  particular way. This section merely provides a set of suggestions
-  for rendering HTML documents that, if followed, are likely to lead
-  to a user experience that closely resembles the experience intended
-  by the documents' authors.</p>
-
   <p>In general, user agents are expected to support CSS, and many of
   the suggestions in this section are expressed in CSS terms. User
   agents that use other presentation mechanisms can derive their
@@ -61011,31 +61012,28 @@
   <p>For the purposes of the CSS table model, the <code>col</code>
   element is to be treated as if it was present as many times as its
   <code title="attr-col-span">span</code> attribute <span title="rules
-  for parsing non-negative integers">specifies</span>.</p> <!-- XXX
-  link to dfn instead of parser -->
+  for parsing non-negative integers">specifies</span>.</p>
 
   <p>For the purposes of the CSS table model, the
   <code>colgroup</code> element, if it contains no <code>col</code>
   element, is to be treated as if it had as many such children as its
   <code title="attr-colgroup-span">span</code> attribute <span
   title="rules for parsing non-negative
-  integers">specifies</span>.</p> <!-- XXX link to dfn instead of
-  parser -->
+  integers">specifies</span>.</p>
 
   <p>For the purposes of the CSS table model, the <code
   title="attr-tdth-colspan">colspan</code> and <code
   title="attr-tdth-rowspan">rowspan</code> attributes on
-  <code>td</code> and <code>th</code> elements are expected to provide
-  the <i>special knowledge</i> regarding cells spanning rows and
-  columns.</p> <!-- XXX link to dfn instead of parser -->
+  <code>td</code> and <code>th</code> elements are expected to <span
+  title="rules for parsing non-negative integers">provide</span> the
+  <i>special knowledge</i> regarding cells spanning rows and
+  columns.</p>
 
 
   <h4>Margins and padding</h4>
 
   <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
 
-body { padding: 8px; }<!-- XXX or margin? -->
-
 blockquote, dir, dl, listing, menu, ol, p, plaintext, pre, ul, xmp {
   margin-top: 1em; margin-bottom: 1em;
 }
@@ -61075,9 +61073,68 @@
 
   <hr>
 
-  <p class="XXX">...body...</p>
-  <!-- marginwidth, marginheight -->
+  <p>For a <code>body</code> element, the 'margin-top',
+  'margin-right', 'margin-bottom', and 'margin-left' properties are
+  expected to be set by presentational hints from a variety of source,
+  given in the table below in precedence order. If one of the
+  attributes listed is present, then the first such attribute's value
+  is expected to be parsed using the <span>rules for parsing
+  non-negative integers</span>; if this does not result in an error,
+  then the parsed value is expected to be used as a pixel length for
+  the corresponding property. If no attribute is found, or if the
+  attribute's value cannot be parsed successfully, then a default
+  value of 8px is expected to be used.</p>
 
+  <!-- XXX so, uh, about the cross-site-styling hole below... -->
+
+  <table>
+   <thead>
+    <tr>
+     <th>Property
+     <th>Source
+   <tbody>
+    <tr>
+     <td rowspan="3">'margin-top'
+     <td><code>body</code> element's <code title="attr-body-marginheight">marginheight</code> attribute
+    <tr>
+     <td>The <code>body</code> element's <span>container frame element</span>'s <code title="attr-frame-marginheight">marginheight</code> attribute
+    <tr>
+     <td><code>body</code> element's <code title="attr-body-topmargin">topmargin</code> attribute
+   <tbody>
+    <tr>
+     <td rowspan="3">'margin-right'
+     <td><code>body</code> element's <code title="attr-body-marginwidth">marginwidth</code> attribute
+    <tr>
+     <td>The <code>body</code> element's <span>container frame element</span>'s <code title="attr-frame-marginwidth">marginwidth</code> attribute
+    <tr>
+     <td><code>body</code> element's <code title="attr-body-rightmargin">rightmargin</code> attribute
+   <tbody>
+    <tr>
+     <td rowspan="3">'margin-bottom'
+     <td><code>body</code> element's <code title="attr-body-marginheight">marginheight</code> attribute
+    <tr>
+     <td>The <code>body</code> element's <span>container frame element</span>'s <code title="attr-frame-marginheight">marginheight</code> attribute
+    <tr>
+     <td><code>body</code> element's <code title="attr-body-bottommargin">topmargin</code> attribute
+   <tbody>
+    <tr>
+     <td rowspan="3">'margin-left'
+     <td><code>body</code> element's <code title="attr-body-marginwidth">marginwidth</code> attribute
+    <tr>
+     <td>The <code>body</code> element's <span>container frame element</span>'s <code title="attr-frame-marginwidth">marginwidth</code> attribute
+    <tr>
+     <td><code>body</code> element's <code title="attr-body-leftmargin">rightmargin</code> attribute
+  </table>
+
+  <p>If the <code>body</code> element's <code>Document</code>'s
+  <span>browsing context</span> is a <span>nested browsing
+  context</span>, and the <span>browsing context container</span> of
+  that <span>nested browsing context</span> is a <code>frame</code> or
+  <code>iframe</code> element, then the the <dfn>container frame
+  element</dfn> of the <code>body</code> element is that
+  <code>frame</code> or <code>iframe</code> element. Otherwise, there
+  is no <span>container frame element</span>.</p>
+
   <hr>
 
   <p class="XXX">...tables...</p>
@@ -61671,8 +61728,13 @@
 
   -->
 
+  <!-- XXX need to separate the author-level rules from the user-agent-level rules
+       so that the user-level rules can slide between them
+       the spec lists the attributes that should count as presentational:
+       http://www.w3.org/Style/Group/css2-src/cascade.html#preshint -->
 
 
+
   <h2>Obsolete features</h2>
 
   <p>Authors and documents must not use the features listed in this

|