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
Copy file name to clipboardExpand all lines: css-gcpm-4/Overview.bs
+63-73Lines changed: 63 additions & 73 deletions
Original file line number
Diff line number
Diff line change
@@ -35,46 +35,61 @@ This module proposes a unified approach to paginated layout based on [[CSS3-REGI
35
35
The existing mechanisms do not cover many use cases.
36
36
37
37
38
-
<h3 id="flow-policy-heading">Copying a flow: the 'flow-policy' property</h3>
38
+
<h3 id="copy-into-heading">Copying a flow: the 'copy-into' property</h3>
39
39
40
-
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]]only allows for an element to be moved to a ''named flow'', so we add the 'flow-policy' property to allow the same element to serve two roles.
40
+
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.
41
41
42
42
<p class="note">Use cases for running heads can be found in [[LATINREQ] http://w3c.github.io/dpub-pagination/#content</p>
Applies To: all elements and pseudo-elements, but not ::first-line or ::first-letter.
51
51
Inherited: no
52
52
Media: visual
53
53
Computed value: as specified
54
54
</pre>
55
55
56
+
The 'copy-into' property contains one or more pairs, each consisting of a custom identifier followed by a content-level keyword describing how to construct the value of the named content fragment.
57
+
58
+
''content-level'' expands to the following values:
59
+
60
+
<pre class="prod">
61
+
<dfn id="content-list">content-list</dfn> = element | content | text | attr(<identifier>) | counter() | counters()
62
+
</pre>
63
+
64
+
56
65
<dl>
57
66
58
-
<dt>extract</dt>
59
-
<dd>the element is taken out of its parent’s flow and placed into the named flow set by the value of the 'flow-into' property.</dd>
67
+
<dt>element</dt>
68
+
<dd>the entire element is copied into the named content fragment</dd>
69
+
70
+
<dt>contents</dt>
71
+
72
+
<dd>only the element’s contents are copied into the named content fragment. This is the default if ''content-level'' is not specified.
60
73
61
-
<dt>copy</dt>
74
+
</dd>
75
+
76
+
<dt>text</dt>
62
77
63
-
<dd>the element remains into it's normal parent's flow but a copy of the element is also extracted from there and placed into the named flow set by the value of the 'flow-into' property.</dd>
78
+
<dd>only the element’s text (including normally collapsed white space) is copied into the named content fragment.
79
+
</dd>
64
80
65
81
</dl>
66
82
67
83
<div class="example">
68
84
<pre>
69
85
h1 {
70
-
flow-into: chapter-title element;
71
-
flow-policy: copy;
86
+
copy-into: chapter-title element;
72
87
font-size: 1.5em;
73
88
}
74
89
75
90
@page {
76
91
@top-center {
77
-
flow-from: chapter-title;
92
+
content: chapter-title'.';
78
93
font-size: .9em;
79
94
font-variant: small-caps;
80
95
}
@@ -83,18 +98,7 @@ h1 {
83
98
</div>
84
99
85
100
86
-
<h3 id="flow-persist-heading">Making “sticky” headers: the 'flow-persist' property</h3>
87
-
88
-
An element flowed into a running head should appear on every page until the value of the element changes, at which point the new value should be used. We define the 'flow-persist' property to control how content is rendered in region chains (????).
89
-
90
-
91
-
We also need to specify which element is used in a running head, when there are multiple possibilities. [[CSS3GCPM]] defines start, first, last, and first-except values.
92
-
93
-
94
-
95
-
96
-
97
-
101
+
<h3 id="flow-persist-heading">Choosing among multiple values on a page</h3>
98
102
99
103
100
104
@@ -111,70 +115,56 @@ Media: visual
111
115
Computed value: as specified
112
116
</pre>
113
117
114
-
<dl>
115
-
116
-
<dt>normal</dt>
117
-
<dd>Content from the named flow is rendered as described in [[CSS3-REGIONS]].</dd>
118
-
119
-
<dt>persist</dt>
120
-
121
-
<dd>Eligible content from the named flow is placed into the first box of the region chain as usual. If there is no eligible content on subsequent pages, the last-used content is used in the region box until new eligible content appears.
122
-
123
-
</dd>
124
-
125
-
<p class="issue">“That is not what I meant at all; That is not it, at all.” —T.S. Eliot</p>
126
-
127
-
128
-
129
118
130
119
131
-
<dt>static</dt>
132
120
133
-
<dd>The first instance of the element is used in every region associated with the region chain (this is the equivalent of flow-options: static in [[PGT]]).</dd>
134
121
135
-
</dl>
136
-
137
-
<p class="issue">Above definitions need work</p>
138
-
139
-
<dl>
140
-
141
-
<dt>first</dt>
142
-
<dd>The value of the first assignment on the page is used. If there is no assignment on the page, the entry value is used. first is the default value.</dd>
143
-
144
-
<dt>start</dt>
145
-
146
-
<dd>If the element is the first element on the page, the value of the first assignment is used. Otherwise the entry value is used. The entry value may be empty if the element hasn’t yet appeared. </dd>
147
-
148
-
<dt>last</dt>
149
-
150
-
<dd>The exit value is used.</dd>
151
-
152
-
<dt>first-except</dt>
153
-
154
-
<dd>This is identical to first, except that the empty string is used on the page where the value is assigned.</dd>
122
+
<div class="example">
123
+
Example using 'copy-from' syntax
124
+
<pre>
125
+
h1 {
126
+
copy-into: chapter-title;
127
+
}
155
128
156
-
</dl>
129
+
@page:left {
130
+
@top-left {
131
+
content: copy-from(chapter-title, first);
132
+
}
133
+
}
157
134
135
+
@page:right {
136
+
@top-right {
137
+
content: copy-from(chapter-title, last);
138
+
}
139
+
}
140
+
</pre>
158
141
142
+
</div>
159
143
160
144
<div class="example">
161
-
145
+
Example using selectors syntax
162
146
<pre>
163
-
h1 {
164
-
flow-into: chapter-title element;
165
-
flow-policy: copy;
147
+
h1:first-of-page {
148
+
copy-into: chapter-title-left;
166
149
}
167
150
168
-
@page {
169
-
@top-center {
170
-
flow-from: chapter-title;
171
-
flow-persist: persist start;
151
+
h1:last-of-page {
152
+
copy-into: chapter-title-right;
153
+
}
154
+
155
+
@page:left {
156
+
@top-left {
157
+
content: chapter-title-left;
172
158
}
173
159
}
174
160
161
+
@page:right {
162
+
@top-right {
163
+
content: chapter-title-right;
164
+
}
165
+
}
175
166
</pre>
176
167
177
-
The @top-center margin box will be populated with the content of the <code>h1</code>. The <code>h1</code> will also appear in the document in its normal place.
178
168
</div>
179
169
180
170
<h2 id="page-area-head">Creating Page Areas</h2>
@@ -392,5 +382,5 @@ Computed value: as specified
392
382
Acknowledgments
393
383
</h2>
394
384
395
-
Tab Atkins, Jr., Håkon Wium Lie, Liam Quin, Peter Sorotokin, Alan Stearns
385
+
Tab Atkins, Jr., Brak Kemper, Håkon Wium Lie, Liam Quin, Peter Sorotokin, Alan Stearns
0 commit comments