Skip to content

Commit 9d45749

Browse files
committed
* remove image-orientation: intrinsic
* make margin boxes instantiate only if content is not none * state relation of margin box layout rules to min/max-height/width * clarifications and fixes to fixed dimension margin box layout rules * inherited properties on @page inherit from :root * define font-size as relative to :root * add issue wrt size: 8.5in 11in landscape; * apply page-break* to table elements * suppress margins only at unforced breaks
1 parent cc0e71b commit 9d45749

2 files changed

Lines changed: 218 additions & 152 deletions

File tree

css3-page/Overview.html

Lines changed: 133 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@
8787

8888
<h1>CSS Paged Media Module Level 3</h1>
8989

90-
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft 9 March 2009</h2>
90+
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft 28 March 2009</h2>
9191

9292
<dl>
9393
<dt>This version:
9494

9595
<dd><a
9696
href="http://dev.w3.org/csswg/css3-page/">http://dev.w3.org/csswg/css3-page/</a></dd>
97-
<!-- <dd><a href="http://www.w3.org/TR/2009/ED-css3-page-20090309">http://www.w3.org/TR/2009/WD-css3-page-20090309</a></dd> -->
97+
<!-- <dd><a href="http://www.w3.org/TR/2009/ED-css3-page-20090328">http://www.w3.org/TR/2009/WD-css3-page-20090328</a></dd> -->
9898

9999
<dt>Latest version:
100100

@@ -179,7 +179,7 @@ <h2 class="no-num no-toc" id=status>Status of this Document</h2>
179179
<!--end-status-->
180180
<p>This document contains the <abbr title="Cascading Style
181181
Sheets">CSS3</abbr> Paged Media Module W3C Last Call <a
182-
href="/2005/10/Process-20051014/tr.html#RecsWD">Working Draft</a> of 9
182+
href="/2005/10/Process-20051014/tr.html#RecsWD">Working Draft</a> of 28
183183
March 2009. The Last Call period ends on <span class=fudge>TBD</span>.</p>
184184

185185
<p>Relative to the previous Last Call Working Draft, this version
@@ -200,8 +200,6 @@ <h2 class="no-num no-toc" id=status>Status of this Document</h2>
200200
<li>image-fit
201201

202202
<li>image-position
203-
204-
<li>image-orientation: intrinsic
205203
</ul>
206204

207205
<p>Expected next revision to this document is another LCWD, driven by the
@@ -210,7 +208,7 @@ <h2 class="no-num no-toc" id=status>Status of this Document</h2>
210208
class=property><a
211209
href="#propdef-image-posn">image-position</a></code>&rsquo;.</p>
212210

213-
<p>The <a href=lc2_issues.htm>Disposition of Comments</a> document
211+
<p>The <a href="lc2_issues.htm">Disposition of Comments</a> document
214212
contains the current issues list and responses to input received during
215213
this Last Call period.</p>
216214

@@ -1286,10 +1284,9 @@ <h3 id=margin-at-rules><span class=secno>6.1 </span>At-rules for margin
12861284
<h3 id=populating-margin-boxes><span class=secno>6.2 </span>Populating
12871285
margin boxes</h3>
12881286

1289-
<p>A margin box is instantiated if a margin context is established the
1290-
computed value of <span class=property>&lsquo;<code
1291-
class=property>content</code>&rsquo;</span> is not <span
1292-
class=css>&lsquo;<code class=property>none</code>&rsquo;</span>.
1287+
<p>A margin box is instantiated if the computed value of its &lsquo;<code
1288+
class=property>content</code>&rsquo; property does not match that of its
1289+
initial value.
12931290

12941291
<div class=example>
12951292
<p>The following style sheet creates a green box in each corner of the
@@ -1298,8 +1295,8 @@ <h3 id=populating-margin-boxes><span class=secno>6.2 </span>Populating
12981295
<pre>
12991296
@page {
13001297
@top-left-corner { content: " "; border: solid green; }
1301-
@top-right-corner { content: ''; border: solid green; }
1302-
@bottom-right-corner { width: 1em; height: 1em; border: solid green; }
1298+
@top-right-corner { content: url(foo.png); border: solid green; }
1299+
@bottom-right-corner { content: counter(page); border: solid green; }
13031300
@bottom-left-corner { content: normal; border: solid green; }
13041301
}
13051302
</pre>
@@ -1309,7 +1306,24 @@ <h3 id=margin-box-dimensions><span class=secno>6.3 </span>Computing Margin
13091306
Box Dimensions</h3>
13101307

13111308
<p>The width and height of each margin box is determined by the rules
1312-
below.</p>
1309+
below. These rules define the equivalent of CSS2.1 Sections 10.3 and 10.6
1310+
for margin boxes.</p>
1311+
1312+
<p>The rules for applying &lsquo;<code
1313+
class=property>min-height</code>&rsquo;, &lsquo;<code
1314+
class=property>max-height</code>&rsquo;, &lsquo;<code
1315+
class=property>min-width</code>&rsquo;, and &lsquo;<code
1316+
class=property>max-width</code>&rsquo; <a href="#CSS21"
1317+
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> do apply to margin boxes and
1318+
may imply a recalculation of the width, height, and/or margins if the
1319+
dimensions resulting from the specified &lsquo;<code
1320+
class=property>width</code>&rsquo; or &lsquo;<code
1321+
class=property>height</code>&rsquo; violate their constraints. If the UA
1322+
does not support the &lsquo;<code class=property>min-height</code>&rsquo;
1323+
or &lsquo;<code class=property>min-width</code>&rsquo; properties then it
1324+
must behave as if &lsquo;<code class=property>min-height</code>&rsquo;
1325+
and &lsquo;<code class=property>min-width</code>&rsquo; were always zero.
1326+
13131327

13141328
<h4 id=max-margin-dimension><span class=secno>6.3.1 </span>Margin Box
13151329
Layout Terminology</h4>
@@ -1354,12 +1368,12 @@ <h4 id=max-margin-dimension><span class=secno>6.3.1 </span>Margin Box
13541368

13551369
<p>For all other margin boxes, the <dfn id=containing-block0>containing
13561370
block</dfn> is the rectangle formed by the encapsulating page margin
1357-
minus the containing blocks of the adjacent corners' margin boxes. Note
1358-
that the size of this containing block is given in one dimension by the
1359-
used page margin and in the other dimension by the <a
1371+
minus the containing blocks of the adjacent corners' margin boxes. This
1372+
means that the size of this containing block is given in one dimension by
1373+
the used page margin and in the other dimension by the <a
13601374
href="#MaxBoxWidth">max box width</a> (for top and bottom margin boxes)
13611375
or <a href="#MaxBoxHeight">max box height</a> (for left and right margin
1362-
boxes) for the other.</p>
1376+
boxes).</p>
13631377

13641378
<h4 id=margin-dimension><span class=secno>6.3.2 </span>Margin Box Variable
13651379
Dimension Computation Rules</h4>
@@ -1445,58 +1459,65 @@ <h4 id=margin-dimension><span class=secno>6.3.2 </span>Margin Box Variable
14451459
<h4 id=margin-constraints><span class=secno>6.3.3 </span>Margin Box Fixed
14461460
Dimension Computation Rules</h4>
14471461

1448-
<p>The following constraints must hold among the used values of each
1462+
<p>The rules below are used to calculate the used values of each
14491463
&lsquo;<code class=property>top-left-corner</code>&rsquo;, &lsquo;<code
14501464
class=property>top-left</code>&rsquo;, &lsquo;<code
14511465
class=property>top-center</code>&rsquo;, &lsquo;<code
14521466
class=property>top-right</code>&rsquo;, and &lsquo;<code
1453-
class=property>top-right-corner</code>&rsquo; margin box's properties:</p>
1454-
1455-
<blockquote>
1456-
<p>&lsquo;<code class=property>margin-top</code>&rsquo; + &lsquo;<code
1457-
class=property>border-top-width</code>&rsquo; + &lsquo;<code
1458-
class=property>padding-top</code>&rsquo; + &lsquo;<code
1459-
class=property>height</code>&rsquo; + &lsquo;<code
1467+
class=property>top-right-corner</code>&rsquo; margin box's &lsquo;<code
1468+
class=property>height</code>&rsquo;, &lsquo;<code
1469+
class=property>margin-top</code>&rsquo;, and &lsquo;<code
1470+
class=property>margin-bottom</code>&rsquo; properties:</p>
1471+
1472+
<ol>
1473+
<li>The following constraint must hold among the used values of the
1474+
margin box's properties:
1475+
<p>&lsquo;<code class=property>margin-top</code>&rsquo; + &lsquo;<code
1476+
class=property>border-top-width</code>&rsquo; + &lsquo;<code
1477+
class=property>padding-top</code>&rsquo; + &lsquo;<code
1478+
class=property>height</code>&rsquo; + &lsquo;<code
1479+
class=property>padding-bottom</code>&rsquo; + &lsquo;<code
1480+
class=property>border-bottom-width</code>&rsquo; + &lsquo;<code
1481+
class=property>margin-bottom</code>&rsquo; = top page margin
1482+
1483+
<li>If &lsquo;<code class=property>border-top-width</code>&rsquo; +
1484+
&lsquo;<code class=property>padding-top</code>&rsquo; + &lsquo;<code
1485+
class=property>height</code>&rsquo; (if it is not &lsquo;<code
1486+
class=css>auto</code>&rsquo;) + &lsquo;<code
14601487
class=property>padding-bottom</code>&rsquo; + &lsquo;<code
1461-
class=property>border-bottom-width</code>&rsquo; + &lsquo;<code
1462-
class=property>margin-bottom</code>&rsquo; = top page margin.
1463-
</blockquote>
1464-
1465-
<p>If &lsquo;<code class=property>height</code>&rsquo; is not &lsquo;<code
1466-
class=property>auto</code>&rsquo; and &lsquo;<code
1467-
class=property>border-top-width</code>&rsquo; + &lsquo;<code
1468-
class=property>padding-top</code>&rsquo; + &lsquo;<code
1469-
class=property>height</code>&rsquo; + &lsquo;<code
1470-
class=property>padding-bottom</code>&rsquo; + &lsquo;<code
1471-
class=property>border-bottom-width</code>&rsquo; (plus any of
1472-
&lsquo;<code class=property>margin-top</code>&rsquo; or &lsquo;<code
1473-
class=property>margin-bottom</code>&rsquo; that are not &lsquo;<code
1474-
class=property>auto</code>&rsquo;) is larger than the height of the top
1475-
page margin, then any &lsquo;<code class=property>auto</code>&rsquo;
1476-
values for &lsquo;<code class=property>margin-top</code>&rsquo; or
1477-
&lsquo;<code class=property>margin-bottom</code>&rsquo; are, for the
1478-
following rules, treated as zero.</p>
1479-
1480-
<p>If all of the above have a computed value other than &lsquo;<code
1481-
class=property>auto</code>&rsquo;, the values are said to be
1482-
"over-constrained". In this case, the specified value of &lsquo;<code
1483-
class=property>margin-top</code>&rsquo; is ignored and the value is
1484-
calculated so as to make the equality true.</p>
1485-
1486-
<p>If there is exactly one value specified as &lsquo;<code
1487-
class=property>auto</code>&rsquo;, its used value follows from the
1488-
equality.</p>
1489-
1490-
<p>If &lsquo;<code class=property>height</code>&rsquo; is set to
1491-
&lsquo;<code class=property>auto</code>&rsquo;, any other &lsquo;<code
1492-
class=property>auto</code>&rsquo; values become &lsquo;<code
1493-
class=css>0</code>&rsquo; and &lsquo;<code
1494-
class=property>height</code>&rsquo; follows from the resulting equality.</p>
1495-
1496-
<p>If both &lsquo;<code class=property>margin-top</code>&rsquo; and
1497-
&lsquo;<code class=property>margin-bottom</code>&rsquo; are &lsquo;<code
1498-
class=property>auto</code>&rsquo;, their used values are equal. This
1499-
vertically centers the margin-box content within the top page margin.</p>
1488+
class=property>border-bottom-width</code>&rsquo;, plus &lsquo;<code
1489+
class=property>margin-top</code>&rsquo; and/or &lsquo;<code
1490+
class=property>margin-bottom</code>&rsquo; if not &lsquo;<code
1491+
class=css>auto</code>&rsquo;, is larger than the height of the top page
1492+
margin, then any &lsquo;<code class=css>auto</code>&rsquo; values for
1493+
&lsquo;<code class=property>margin-top</code>&rsquo; or &lsquo;<code
1494+
class=property>margin-bottom</code>&rsquo; are, for the following rules,
1495+
treated as zero.
1496+
1497+
<li>If at this point all of &lsquo;<code
1498+
class=property>height</code>&rsquo;, &lsquo;<code
1499+
class=property>margin-top</code>&rsquo;, and &lsquo;<code
1500+
class=property>margin-bottom</code>&rsquo; have a computed value other
1501+
than &lsquo;<code class=css>auto</code>&rsquo;, the values are said to
1502+
be "over-constrained". In this case, the specified value of &lsquo;<code
1503+
class=property>margin-top</code>&rsquo; is treated as &lsquo;<code
1504+
class=property>auto</code>&rsquo;.
1505+
1506+
<li>If there is now exactly one value specified as &lsquo;<code
1507+
class=property>auto</code>&rsquo;, its used value follows from the
1508+
equality.
1509+
1510+
<li>If &lsquo;<code class=property>height</code>&rsquo; is set to
1511+
&lsquo;<code class=property>auto</code>&rsquo;, any other &lsquo;<code
1512+
class=property>auto</code>&rsquo; values become &lsquo;<code
1513+
class=css>0</code>&rsquo; and &lsquo;<code
1514+
class=property>height</code>&rsquo; follows from the resulting equality
1515+
1516+
<li>If both &lsquo;<code class=property>margin-top</code>&rsquo; and
1517+
&lsquo;<code class=property>margin-bottom</code>&rsquo; are &lsquo;<code
1518+
class=property>auto</code>&rsquo;, their used values are equal. This
1519+
vertically centers the margin-box content within the top page margin.
1520+
</ol>
15001521

15011522
<p>The same rules apply to the bottom margin boxes (bottom-left-corner,
15021523
bottom-left, bottom-center, bottom-right, and bottom-right-corner),
@@ -1723,17 +1744,27 @@ <h2 id=page-properties><span class=secno>7 </span>Page Properties</h2>
17231744
exceptions:</p>
17241745

17251746
<ul>
1726-
<li>Values in units of <span class=css>&lsquo;<code
1727-
class=property>em</code>&rsquo;</span> and <span class=css>&lsquo;<code
1728-
class=property>ex</code>&rsquo;</span> are interpreted relative to
1729-
their context. The <a href="#page-context">page context</a> has a font
1730-
associated with it by an explicit use of font properties, or from the
1731-
UA's default style sheet, or from their initial values. (When the value
1732-
is taken from the UA's default style sheet, the UA may choose to apply
1733-
the value of the root element's &lsquo;<code
1734-
class=property>font-family</code>&rsquo; property.) A margin context
1735-
has a font association via explicit use of font properties within the
1736-
margin context, or via inheritance from the page context.
1747+
<li>Margin boxes inherit from the page context. The page context
1748+
inherits from the root element. However, since the previous revision of
1749+
CSS Paged Media Level 3 did not specify this point, an implementation
1750+
that sets inherited properties in the page context to their initial
1751+
values (as for the root element) is also conformant to CSS Paged Media
1752+
Level 3. Note that this exception will be removed in Level 4.
1753+
1754+
<li>Values in units of &lsquo;<code class=css>em</code>&rsquo; and
1755+
&lsquo;<code class=css>ex</code>&rsquo; are interpreted relative to the
1756+
font associated with their context. When used on the &lsquo;<code
1757+
class=property>font-size</code>&rsquo; property in the margin context,
1758+
they are relative to the font of the page context. When used on the
1759+
&lsquo;<code class=property>font-size</code>&rsquo; property in the
1760+
page context, they are relative to the &lsquo;<code
1761+
class=property>font-size</code>&rsquo; of the root element. However,
1762+
since a previous revision of CSS Paged Media Level 3 was ambiguous on
1763+
this point, an implementation that treats &lsquo;<code
1764+
class=css>em</code>&rsquo; and &lsquo;<code class=css>ex</code>&rsquo;
1765+
on &lsquo;<code class=property>font-size</code>&rsquo; as relative to
1766+
the initial value is also conformant to CSS Paged Media Level 3. Note
1767+
that this exception will be removed in Level 4.
17371768

17381769
<li>Percentage values on the margin and padding properties are relative
17391770
to the dimensions of the containing block. For right and left values,
@@ -2057,6 +2088,9 @@ <h3 id=page-size-prop><span class=secno>8.1 </span>Page size: the
20572088
href="#size">size</a></code>&rsquo;</span> property also indicates the
20582089
size of the destination page sheet.</p>
20592090

2091+
<p class=issue>Should it be allowed to combine &lt;length&gt; and
2092+
[portrait|landscape]? What's implemented right now?</p>
2093+
20602094
<p>The size of a page box can either be "absolute" (fixed size) or
20612095
"relative" (scalable, i.e., fitting available sheet sizes).</p>
20622096

@@ -2406,7 +2440,7 @@ <h3 id=pg-br-before-after><span class=secno>9.1 </span>Break before/after
24062440
<tr>
24072441
<th>Applies to:
24082442

2409-
<td>block-level elements
2443+
<td>block-level boxes, table row groups, table rows (but see prose)
24102444

24112445
<tr>
24122446
<th>Inherited:
@@ -2449,7 +2483,8 @@ <h3 id=pg-br-before-after><span class=secno>9.1 </span>Break before/after
24492483
<tr>
24502484
<th>Applies to:
24512485

2452-
<td>block-level elements
2486+
<td>block-level boxes, table row groups, table rows, and table cells
2487+
(but see prose)
24532488

24542489
<tr>
24552490
<th>Inherited:
@@ -2518,6 +2553,15 @@ <h3 id=pg-br-before-after><span class=secno>9.1 </span>Break before/after
25182553
href="#allowed-pg-brk">allowed page breaks</a> for the exact rules on
25192554
how these properties affect page breaks.</p>
25202555

2556+
<p>User Agents must apply these properties to block-level boxes and to
2557+
table rows, table row groups, and&#8212;in the case of &lsquo;<code
2558+
class=property><a
2559+
href="#page-break-inside">page-break-inside</a></code>&rsquo;&#8212;table
2560+
cells of block-level tables in the normal flow of the root element. User
2561+
agents should also apply these properties to floated boxes whose
2562+
containing block is in the normal flow of the root element. User agents
2563+
may also apply these properties to other boxes.
2564+
25212565
<h3 id=using-named-pages><span class=secno>9.2 </span>Using named pages:
25222566
&lsquo;<code class=property><a href="#page">page</a></code>&rsquo;</h3>
25232567

@@ -2749,12 +2793,15 @@ <h3 id=allowed-pg-brk><span class=secno>9.4 </span>Allowed page breaks</h3>
27492793

27502794
<ol>
27512795
<li>In the vertical margin between sibling block boxes (or rows in a
2752-
table). When a page break occurs here, the used values of the adjoining
2753-
<span class=property>&lsquo;<code
2754-
class=property>margin-bottom</code>&rsquo;</span> and <span
2755-
class=property>&lsquo;<code
2756-
class=property>margin-top</code>&rsquo;</span> properties are set to
2757-
<span class=css>&lsquo;<code class=css>0</code>&rsquo;</span>.
2796+
table). When a page break occurs here, the used value of the adjoining
2797+
&lsquo;<code class=property>margin-bottom</code>&rsquo;
2798+
and&#8212;unless the page break is forced by &lsquo;<code
2799+
class=property><a
2800+
href="#page-break-before">page-break-before</a></code>&rsquo;,
2801+
&lsquo;<code class=property><a
2802+
href="#page-break-after">page-break-after</a></code>&rsquo;, or the use
2803+
of named pages&#8212;&lsquo;<code
2804+
class=property>margin-top</code>&rsquo; properties are set to zero.
27582805

27592806
<li>Between line boxes inside a block box.
27602807
</ol>
@@ -2937,7 +2984,7 @@ <h3 id=image-orientation><span class=secno>10.1 </span>Orienting an Image
29372984
<tr>
29382985
<th>Value:
29392986

2940-
<td>&lt;angle&gt; | intrinsic
2987+
<td>&lt;angle&gt;
29412988

29422989
<tr>
29432990
<th>Initial:
@@ -2967,8 +3014,7 @@ <h3 id=image-orientation><span class=secno>10.1 </span>Orienting an Image
29673014
<tr>
29683015
<th>Computed value:
29693016

2970-
<td>normalized angle or &lsquo;<code
2971-
class=property>intrinsic</code>&rsquo;
3017+
<td>normalized angle
29723018
</table>
29733019

29743020
<p>&lsquo;<code class=property><a
@@ -2991,13 +3037,6 @@ <h3 id=image-orientation><span class=secno>10.1 </span>Orienting an Image
29913037
property apply to an image:</p>
29923038

29933039
<dl>
2994-
<dt>intrinsic
2995-
2996-
<dd>The image will be oriented according to orientation metadata
2997-
contained within the image source data. If no such metadata is
2998-
available, the image is oriented as for &lsquo;<code
2999-
class=css>0deg</code>&rsquo;.
3000-
30013040
<dt>&lt;angle&gt;
30023041

30033042
<dd>Positive values cause the image to be rotated to the right (in a
@@ -3142,7 +3181,7 @@ <h3 id=img-fit><span class=secno>10.2 </span>The &lsquo;<code
31423181
rel=biblioentry>[SMIL10]<!--{{SMIL10}}--></a>.</p>
31433182

31443183
<div class=figure>
3145-
<p><img alt="Illustration of the four values" src=img_scale.png
3184+
<p><img alt="Illustration of the four values" src="img_scale.png"
31463185
style="width: 70%; border: thin solid black;"></p>
31473186

31483187
<p class=caption> An example showing how each of the four values of

0 commit comments

Comments
 (0)