You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There have been many proposals for using CSS to move document content, often motivated by the desire for magazine- or book-style layout of footnotes, running heads, pull quotes, sidebars, and so on. [[CSS3GCPM]] used float: footnote and position: running(). The now-abandoned [[CSS3GENCON]] Working Draft used content: footnote. PrinceXML (and older GCPM drafts) has content: flow() and flow: static(). WHATWG CSS Books has flow: area().
22
21
23
22
This module proposes a unified approach to paginated layout based on [[CSS3-REGIONS]] and [[CSS3-PAGE-TEMPLATE]]. Additional properties will be introduced as necessary.
24
23
25
24
26
-
27
-
28
-
<!--page areas-->
29
25
<h2 id="running-headers-and-footers">
30
26
Running headers and footers
31
27
</h2>
@@ -40,7 +36,7 @@ The existing mechanisms do not cover many use cases.
40
36
41
37
Headers often contain document content, and it is desirable to both display that content normally (for example, as an <code>h1</code>) and to use the content in a running head. [[CSS3-REGIONS]] allows for an element to be moved to a ''named flow'', but doesn't allow for using the same content in two ways. The 'copy-into' property allows an element to be copied into a content fragment which can then be placed with the 'content' property.
42
38
43
-
<p class="note">Use cases for running heads can be found in [[LATINREQ] http://w3c.github.io/dpub-pagination/#content</p>
39
+
<p class="note">Use cases for running heads can be found in [[LATINREQ]] http://w3c.github.io/dpub-pagination/#content</p>
44
40
45
41
46
42
@@ -64,21 +60,14 @@ The 'copy-into' property contains one or more pairs, each consisting of a custom
64
60
65
61
66
62
<dl>
67
-
68
63
<dt>element</dt>
69
64
<dd>the entire element is copied into the named content fragment</dd>
70
65
71
66
<dt>contents</dt>
72
-
73
-
<dd>only the element’s contents are copied into the named content fragment. This is the default if ''content-level'' is not specified.
74
-
75
-
</dd>
67
+
<dd>only the element’s contents are copied into the named content fragment. This is the default if ''content-level'' is not specified.</dd>
76
68
77
69
<dt>text</dt>
78
-
79
-
<dd>only the element’s text (including normally collapsed white space) is copied into the named content fragment.
80
-
</dd>
81
-
70
+
<dd>only the element’s text (including normally collapsed white space) is copied into the named content fragment.</dd>
82
71
</dl>
83
72
84
73
<div class="example">
@@ -101,41 +90,25 @@ h1 {
101
90
102
91
<h3 id="flow-persist-heading">Choosing among multiple values on a page</h3>
By default, the content fragment name would be global, as the named flow is with 'flow-into'. But if one of the following pseudo-classes are used on the subject of the selector, then the name is locally scoped to just the page the element is on.
105
96
97
+
<dl>
106
98
99
+
<dt><dfn>:nth-of-page(n)</dfn></dt>
100
+
<dd>The element is the nth matched element on the page.</dd>
107
101
102
+
<dt><dfn>:first-of-page</dfn></dt>
103
+
<dd>Same as :nth-of-page(n), but where n = 1 (it is the first matched element on the page).</dd>
Value: ( normal | persist | static ), ( start | first | last | first-except)?
113
-
Initial: normal
114
-
Applies To: all elements with a value of 'flow-from' other than none.
115
-
Inherited: no
116
-
Media: visual
117
-
Computed value: as specified
118
-
</pre>
119
-
-->
120
-
121
-
122
-
123
-
124
-
<h4>Page selector pseudo-classes</h4>
125
-
126
-
By default, the content fragment name would be global, as the named flow is with 'flow-into'. But if one of the following pseudo-classes are used on the subject of the selector, then the name is locally scoped to just the page the element is on.
127
-
128
-
:: : :nth-of-page(n)
129
-
:: The element is the nth matched element on the page.
130
-
131
-
:: : :first-of-page
132
-
:: Same as :nth-of-page(n), but where n = 1 (it is the first matched element on the page).
105
+
<dt><dfn>:last-of-page</dfn></dt>
106
+
<dd>The element is the last matched element on the page.</dd>
133
107
134
-
:: : :last-of-page
135
-
:: The element is the last matched element on the page.
108
+
<dt><dfn>:start-of-page</dfn></dt>
109
+
<dd>The element is the first matched element on the page, and neither it nor its ancestors have any previous siblings that appear on the page.</dd>
136
110
137
-
:: : :start-of-page
138
-
:: The element is the first matched element on the page, and neither it nor its ancestors have any previous siblings that appear on the page.
111
+
</dl>
139
112
140
113
141
114
<div class="example">
@@ -165,7 +138,9 @@ h1::after {
165
138
</pre>
166
139
167
140
168
-
The value of the named string “headerP1” will be “Chapter 1”, and the value of the named string “headerP2” will be “Voyage of the <i>Beagle</i>”. headerP2 will include the italic tags around "Beagle", because the <content-type> defaults to 'contents', not 'text'. The value of the named string “headerP3” will be “.”. The top-center content will be “Chapter 1: The Voyage of the <i>Horizon</i>.”</div>
141
+
The value of the named string “headerP1” will be “Chapter 1”, and the value of the named string “headerP2” will be “Voyage of the <i>Beagle</i>”. headerP2 will include the italic tags around "Beagle", because the <code>content-type</code> defaults to ''copy-into/contents'', not ''copy-into/text''. The value of the named string “headerP3” will be “.”. The top-center content will be “Chapter 1: The Voyage of the <i>Horizon</i>.”
<figcaption>Since there’s not an h2 at the top of this page, the <a href="#string-start">start</a> value is the ''exit value'' of the previous page.</figcaption>
Applies To: elements for which 'flow-into' property was specified
378
-
Inherited: no
379
-
Media: visual
380
-
Computed value: as specified
381
-
</pre>
382
-
383
-
<dl>
384
-
<dt>exclusive</dt>
385
-
<dd>When content is selected for a partition, elements marked as exclusive are
386
-
considered first. Only one exclusive element is used for a single partition and one
387
-
element is always consumed (and removed from the flow if it is not also marked as
388
-
<span class="val">static</span>).</dd>
389
-
<dt>static</dt>
390
-
<dd>When an element is consumed in a partition, it is removed from the flow, unless it
391
-
is marked as <span class="val">static</span>. Static elements are placed in the flow
392
-
again when they are consumed.</dd>
393
-
<dt>last</dt>
394
-
<dd>When this option is applied to elements which are also marked <span class="val"
395
-
>exclusive</span>, the last of them is flowed in the next available
396
-
partition.</dd>
397
-
</dl>
398
-
399
-
<h3>flow-linger</h3>
400
-
401
-
The 'flow-linger' property determines how many pages an element is eligible for on a page. None means it stays eligible until consumed. <integer> must be positive and means number of pages. 1 means that it should be used on the same page it became eligible.
402
-
403
-
<pre class="propdef">
404
-
Name: <dfn id="flow-linger-pgt">flow-linger</dfn>
405
-
Values: none | <integer>
406
-
Initial: none
407
-
Applies To: elements for which 'flow-into' property was specified
0 commit comments