Skip to content

Commit 89b9afe

Browse files
author
howcome
committed
revising page and column pseudo-elements
1 parent fb9d38f commit 89b9afe

1 file changed

Lines changed: 24 additions & 4 deletions

File tree

css-gcpm/Overview.src.html

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3518,7 +3518,9 @@ <h2>Page and column floats, alternative syntax</h2>
35183518
-->
35193519

35203520

3521-
<h2>Selecting pages</h2>
3521+
<h2>Selecting columns and pages</h2>
3522+
3523+
<h3>Selecting named pages</h3>
35223524

35233525
<p>In CSS2, <a href="http://www.w3.org/TR/CSS2/page.html#page-selectors">first, left and right pages</a> can be selected. This specification adds support for selecting the nth page.
35243526

@@ -3545,10 +3547,11 @@ <h2>Selecting pages</h2>
35453547
<p>The grammar of allowed arguments to nth() is the same as the <a href="http://www.w3.org/TR/css3-selectors/#nth-child-pseudo">nth-child() pseudo-class</a>.
35463548

35473549
<div class=example>
3548-
<p>In this example, pages in a document will alternate between pink and lime backgrounds:
3550+
<p>In this example, pages in a document will cycle through pink, lime and white backgrounds:
35493551
<pre>
3550-
@page :nth(odd) { background: pink }
3551-
@page :nth(even)) { background: lime }
3552+
@page :nth(3n) { background: pink }
3553+
@page :nth(3n+1)) { background: lime }
3554+
@page :nth(3n+2)) { background: white }
35523555
</pre>
35533556
</div>
35543557

@@ -3613,6 +3616,23 @@ <h3>Page groups</h2>
36133616

36143617
</div>
36153618

3619+
<h3>'page' and 'column' pseudo-elements</h3>
3620+
3621+
<div class=example>
3622+
<pre>
3623+
article::page(left) p { /* select all p elements that appear on left pages in an article */
3624+
...
3625+
}
3626+
</pre>
3627+
</div>
3628+
3629+
<div class=example>
3630+
<pre>
3631+
article::column(2n) { /* select every other column of an article */
3632+
...
3633+
}
3634+
</pre>
3635+
</div>
36163636

36173637
<h2>Selecting lines</h2>
36183638

0 commit comments

Comments
 (0)