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/Overview.src.html
+24-4Lines changed: 24 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3518,7 +3518,9 @@ <h2>Page and column floats, alternative syntax</h2>
3518
3518
-->
3519
3519
3520
3520
3521
-
<h2>Selecting pages</h2>
3521
+
<h2>Selecting columns and pages</h2>
3522
+
3523
+
<h3>Selecting named pages</h3>
3522
3524
3523
3525
<p>In CSS2, <ahref="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.
3524
3526
@@ -3545,10 +3547,11 @@ <h2>Selecting pages</h2>
3545
3547
<p>The grammar of allowed arguments to nth() is the same as the <ahref="http://www.w3.org/TR/css3-selectors/#nth-child-pseudo">nth-child() pseudo-class</a>.
3546
3548
3547
3549
<divclass=example>
3548
-
<p>In this example, pages in a document will alternate between pinkand lime backgrounds:
3550
+
<p>In this example, pages in a document will cycle through pink, lime and white backgrounds:
3549
3551
<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 }
3552
3555
</pre>
3553
3556
</div>
3554
3557
@@ -3613,6 +3616,23 @@ <h3>Page groups</h2>
3613
3616
3614
3617
</div>
3615
3618
3619
+
<h3>'page' and 'column' pseudo-elements</h3>
3620
+
3621
+
<divclass=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
+
<divclass=example>
3630
+
<pre>
3631
+
article::column(2n) { /* select every other column of an article */
0 commit comments