Skip to content

Commit 6c95f04

Browse files
author
dauwhe
committed
[css-content] massive update of GenCon. Removed stuff that is now in other specs. Moved stuff from GCPM to here. Bikeshedded and fixed some examples.
--HG-- rename : css-content/Overview.src.html => css-content/Overview.bs
1 parent 70a2efb commit 6c95f04

9 files changed

Lines changed: 2135 additions & 3199 deletions

File tree

css-content/Overview.bs

Lines changed: 1189 additions & 0 deletions
Large diffs are not rendered by default.

css-content/Overview.html

Lines changed: 883 additions & 1784 deletions
Large diffs are not rendered by default.

css-content/Overview.src.html

Lines changed: 0 additions & 1342 deletions
This file was deleted.

css-content/images/leader.001.jpg

237 KB
Loading

css-content/images/leader.002.jpg

244 KB
Loading
225 KB
Loading
93.2 KB
Loading
107 KB
Loading

css-gcpm-4/Overview.bs

Lines changed: 63 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -35,46 +35,61 @@ This module proposes a unified approach to paginated layout based on [[CSS3-REGI
3535
The existing mechanisms do not cover many use cases.
3636

3737

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>
3939

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.
4141

4242
<p class="note">Use cases for running heads can be found in [[LATINREQ] http://w3c.github.io/dpub-pagination/#content</p>
4343

4444

4545

4646
<pre class="propdef">
47-
Name: <dfn id="flow-policy-property">flow-policy</dfn>
48-
Value: extract | copy
49-
Initial: extract
50-
Applies To: all elements with a value of 'flow-into' other than none.
47+
Name: <dfn id="copy-into-property">copy-into</dfn>
48+
Value: none | [ [ &lt;custom-ident> &lt;content-level>] [, &lt;custom-ident> &lt;content-level>]* ]?
49+
Initial: none
50+
Applies To: all elements and pseudo-elements, but not ::first-line or ::first-letter.
5151
Inherited: no
5252
Media: visual
5353
Computed value: as specified
5454
</pre>
5555

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(&lt;identifier>) | counter() | counters()
62+
</pre>
63+
64+
5665
<dl>
5766

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.
6073

61-
<dt>copy</dt>
74+
</dd>
75+
76+
<dt>text</dt>
6277

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>
6480

6581
</dl>
6682

6783
<div class="example">
6884
<pre>
6985
h1 {
70-
flow-into: chapter-title element;
71-
flow-policy: copy;
86+
copy-into: chapter-title element;
7287
font-size: 1.5em;
7388
}
7489

7590
@page {
7691
@top-center {
77-
flow-from: chapter-title;
92+
content: chapter-title '.';
7893
font-size: .9em;
7994
font-variant: small-caps;
8095
}
@@ -83,18 +98,7 @@ h1 {
8398
</div>
8499

85100

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>
98102

99103

100104

@@ -111,70 +115,56 @@ Media: visual
111115
Computed value: as specified
112116
</pre>
113117

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-
129118

130119

131-
<dt>static</dt>
132120

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>
134121

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+
}
155128

156-
</dl>
129+
@page:left {
130+
@top-left {
131+
content: copy-from(chapter-title, first);
132+
}
133+
}
157134

135+
@page:right {
136+
@top-right {
137+
content: copy-from(chapter-title, last);
138+
}
139+
}
140+
</pre>
158141

142+
</div>
159143

160144
<div class="example">
161-
145+
Example using selectors syntax
162146
<pre>
163-
h1 {
164-
flow-into: chapter-title element;
165-
flow-policy: copy;
147+
h1:first-of-page {
148+
copy-into: chapter-title-left;
166149
}
167150

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;
172158
}
173159
}
174160

161+
@page:right {
162+
@top-right {
163+
content: chapter-title-right;
164+
}
165+
}
175166
</pre>
176167

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.
178168
</div>
179169

180170
<h2 id="page-area-head">Creating Page Areas</h2>
@@ -392,5 +382,5 @@ Computed value: as specified
392382
Acknowledgments
393383
</h2>
394384

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
396386

0 commit comments

Comments
 (0)