Skip to content

Commit f54d524

Browse files
author
howcome
committed
machine-generated version
1 parent f70243e commit f54d524

1 file changed

Lines changed: 116 additions & 80 deletions

File tree

css-gcpm/Overview.html

Lines changed: 116 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<meta content="CSS Generated Content for Paged Media Module"
1212
name=dcterms.title>
1313
<meta content=text name=dcterms.type>
14-
<meta content=2013-09-07 name=dcterms.date>
14+
<meta content=2013-09-08 name=dcterms.date>
1515
<meta content="Håkon Wium Lie" name=dcterms.creator>
1616
<meta content=W3C name=dcterms.publisher>
1717
<meta content="http://dev.w3.org/csswg/css3-gcpm/" name=dcterms.identifier>
@@ -42,13 +42,13 @@
4242

4343
<h1>CSS Generated Content for Paged Media Module</h1>
4444

45-
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft 7 September 2013</h2>
45+
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft 8 September 2013</h2>
4646

4747
<dl>
4848
<dt>This version:
4949

5050
<dd><a
51-
href="http://dev.w3.org/csswg/css3-gcpm/">http://www.w3.org/TR/2013/ED-css3-gcpm-20130907/</a>
51+
href="http://dev.w3.org/csswg/css3-gcpm/">http://www.w3.org/TR/2013/ED-css3-gcpm-20130908/</a>
5252

5353
<dt>Latest version:
5454

@@ -309,6 +309,10 @@ <h2 class="no-num no-toc" id=table-of-contents><a name=contents>Table of
309309

310310
<li><a href="#selecting-pages"><span class=secno>17. </span>Selecting
311311
pages</a>
312+
<ul class=toc>
313+
<li><a href="#page-groups-"><span class=secno>17.1. </span>Page groups
314+
</a>
315+
</ul>
312316

313317
<li><a href="#selecting-lines"><span class=secno>18. </span>Selecting
314318
lines</a>
@@ -4476,114 +4480,128 @@ <h2 id=regions-and-exclusions-examples><span class=secno>16. </span>Regions
44764480

44774481
<h2 id=selecting-pages><span class=secno>17. </span>Selecting pages</h2>
44784482

4479-
<p>In CSS 2.0, <a
4483+
<p>In CSS2, <a
44804484
href="http://www.w3.org/TR/CSS2/page.html#page-selectors">first, left and
44814485
right pages</a> can be selected. This specification adds support for
4482-
selecting the nth page of a certiain type.
4483-
4484-
<p>The ‘<code class=property>first-page</code>’ pseudo-element is
4485-
similar to the ‘<code class=property>first-letter</code>’ and ‘<code
4486-
class=property>first-line</code>’ elements; it is used to apply styling
4487-
to the part of an element that ends up on the starting page for that
4488-
element. If the whole element appears on the starting page, ‘<code
4489-
class=property>first-page</code>’ applies to the whole element. The
4490-
following properties apply to :first-page pseudo-elements: column
4491-
properties, background properties, margin properties, border properties,
4492-
and padding properties. UAs may apply other properties as well.
4486+
selecting the nth page. <!--
4487+
<p>The 'first-page' pseudo-element is similar to the 'first-letter'
4488+
and 'first-line' elements; it is used to apply styling to the part of
4489+
an element that ends up on the starting page for that element. If the
4490+
whole element appears on the starting page, 'first-page' applies to
4491+
the whole element. The following properties apply to :first-page
4492+
pseudo-elements: column properties, background properties, margin
4493+
properties, border properties, and padding properties. UAs may apply
4494+
other properties as well.
4495+
-->
44934496

44944497
<div class=example>
4495-
<p>In this example, there will be one column on the starting page of each
4496-
chapter, while subsequent pages will have two columns:
4498+
<p>In this example, the first page of an article will have a pink
4499+
background, and the second will be lime:
44974500

44984501
<pre>
4499-
div.chapter { columns: 2 }
4500-
div.chapter::first-page { columns: 1 }
4502+
@page funky:nth(1) { background: pink }
4503+
@page funky:nth(2) { background: lime }
4504+
article { page: funky }
45014505
</pre>
45024506
</div>
45034507

4508+
<p>The grammar of allowed arguments to nth() is the same as the <a
4509+
href="http://www.w3.org/TR/css3-selectors/#nth-child-pseudo">nth-child()
4510+
pseudo-class</a>.
4511+
45044512
<div class=example>
4505-
<p>In this example, padding is added on the left side on the starting page
4506-
of each chapter:
4513+
<p>In this example, pages in a document will alternate between pink and
4514+
lime backgrounds:
45074515

45084516
<pre>
4509-
div.chapter { break-before: left }
4510-
div.chapter::first-page { padding-left: 4em }
4517+
@page :nth(odd) { background: pink }
4518+
@page :nth(even)) { background: lime }
45114519
</pre>
45124520
</div>
45134521

4514-
<p>As a generalization of the ‘<code class=property>first-page</code>
4515-
pseudo-element, the ‘<code class=css>page()</code>’ pseudo-selector
4516-
allows other pages to be selected.
4522+
<h3 id=page-groups-><span class=secno>17.1. </span>Page groups</h3>
45174523

4518-
<div class=example>
4519-
<pre>
4520-
div.chapter::page(2) /* second page of the element */
4521-
div.chapter::page(2n) /* even pages of the element */
4522-
div.chapter::page(2-4) /* select page 2, 3, and 4 */
4523-
div.chapter::page(2)::column(2) /* second column, but only if it appears on the second page */
4524-
</pre>
4525-
</div>
4526-
<!--
4527-
nth page in the document, or the nth named page.
4524+
<p>Named pages can appear in sequence, stemming from different elements. A
4525+
sequnce of named pages is called a <em>page group</em>. The ‘<a
4526+
href="#page-group"><code class=property>page-group</code></a>’ property
4527+
expresses whether an element starts a new page group or not.
45284528

4529+
<table class=propdef>
4530+
<tbody>
4531+
<tr>
4532+
<td><em>Name:</em>
45294533

4530-
<div class=example>
4531-
<p>This example sets the background color of the second page in the document:
4534+
<td><dfn id=page-group>page-group</dfn>
45324535

4533-
<pre>
4534-
@page :nth(2) {
4535-
background: green;
4536-
}
4537-
<pre>
4538-
</div>
4536+
<tr>
4537+
<td><em>Value:</em>
45394538

4540-
<div class=example>
4541-
<p>This example sets the background color of the second page of all chapters in a document:
4539+
<td>auto | start
45424540

4543-
<pre>
4544-
@page chapter {
4545-
background: yellow;
4546-
}
4547-
@page chapter:nth(2) {
4548-
background: green;
4549-
}
4550-
div.chapter {
4551-
page: chapter;
4552-
}
4553-
<pre>
4554-
</div>
4541+
<tr>
4542+
<td><em>Initial:</em>
45554543

4556-
<p>The arguments to the nth() functional notation is the same as for the <a href="http://www.w3.org/TR/css3-selectors/#nth-child-pseudo">nth-child()</a> pseudo-class.
4544+
<td>auto
45574545

4558-
<div class="example">
4559-
<pre>
4560-
@page chapter:nth(2n+1) {
4561-
background: green;
4562-
}
4563-
</pre>
4564-
</div>
4546+
<tr>
4547+
<td><em>Applies to:</em>
45654548

4566-
<p>Even when a named page is not defined through an <code>@page <em>name</em> { .. }</code> construct, the name can still be used with :nth().
4549+
<td>elements with ‘<code class=property>page</code>’ value other
4550+
than auto
45674551

4568-
<div class="example">
4569-
<p>Even when the first line is commented out, the second page of all chapters in the document will be green.
4552+
<tr>
4553+
<td><em>Inherited:</em>
45704554

4571-
<pre>
4572-
/* @page chapter { ... } */
4555+
<td>no
45734556

4574-
@page chapter:nth(2) {
4575-
background: green;
4576-
}
4557+
<tr>
4558+
<td><em>Percentages:</em>
45774559

4578-
div.chapter { page: chapter }
4579-
</pre>
4580-
</div>
4560+
<td>N/A
45814561

4562+
<tr>
4563+
<td><em>Media:</em>
45824564

4583-
<h3>Page pseudo-elements</h3>
4565+
<td>paged
45844566

4585-
<p class=issue>This may no longer be needed du to generic page selectors
4586-
-->
4567+
<tr>
4568+
<td><em>Computed value:</em>
4569+
4570+
<td>as specified
4571+
</table>
4572+
4573+
<p>This property determines whether the element starts a new page group or
4574+
not.
4575+
4576+
<dl>
4577+
<dt>auto
4578+
4579+
<dd>The element only starts a new page group if ‘<code
4580+
class=property>page</code>’ has a named page different from the the
4581+
previous element.
4582+
4583+
<dt>start
4584+
4585+
<dd>The element starts a new page group.
4586+
</dl>
4587+
4588+
<div class=example>
4589+
<p>In this example, each article starts a new page group so that the first
4590+
page of each article has a pink background.
4591+
4592+
<pre>
4593+
@page funky:first-page {
4594+
background: pink;
4595+
}
4596+
article {
4597+
page: funky;
4598+
page-group: start;
4599+
}
4600+
</pre>
4601+
4602+
<p>Without the ‘<code class=css>page-group: start</code>’ declaration,
4603+
only the first page of the first article would be pink.
4604+
</div>
45874605

45884606
<h2 id=selecting-lines><span class=secno>18. </span>Selecting lines</h2>
45894607

@@ -4754,6 +4772,9 @@ <h2 class=no-num id=index>Index</h2>
47544772
<li>named strings, <a href="#named-strings0"
47554773
title="section 1."><strong>1.</strong></a>
47564774

4775+
<li>page-group, <a href="#page-group"
4776+
title="section 17.1."><strong>17.1.</strong></a>
4777+
47574778
<li>running elements, <a href="#running-elements0"
47584779
title="section 1."><strong>1.</strong></a>
47594780

@@ -4933,6 +4954,21 @@ <h2 class=no-num id=property-index>Property index</h2>
49334954

49344955
<td>visual, paged
49354956

4957+
<tr>
4958+
<th><a class=property href="#page-group">page-group</a>
4959+
4960+
<td>auto | start
4961+
4962+
<td>auto
4963+
4964+
<td>elements with ‘page’ value other than auto
4965+
4966+
<td>no
4967+
4968+
<td>N/A
4969+
4970+
<td>paged
4971+
49364972
<tr>
49374973
<th><a class=property href="#string-set">string-set</a>
49384974

0 commit comments

Comments
 (0)