@@ -290,12 +290,12 @@ <h2 class="no-num no-toc" id=table-of-contents><a name=contents>Table of
290290 < li > < a href ="#selecting-certain-named-pages "> < span class =secno > 13.1.
291291 </ span > Selecting certain named pages</ a >
292292
293- < li > < a href ="#page-groups- "> < span class =secno > 13.2. </ span > Page groups
294- </ a >
293+ < li > < a href ="#selecting-elements-within-pages-and-colu "> < span
294+ class =secno > 13.2. </ span > Selecting elements within pages and
295+ columns</ a >
295296
296- < li > < a href ="#page-and-column-pseudo-elements "> < span class =secno > 13.3.
297- </ span > ‘< code class =property > page</ code > ’ and ‘< code
298- class =property > column</ code > ’ pseudo-elements</ a >
297+ < li > < a href ="#page-groups- "> < span class =secno > 13.3. </ span > Page groups
298+ </ a >
299299 </ ul >
300300
301301 < li > < a href ="#selecting-lines "> < span class =secno > 14. </ span > Selecting
@@ -4130,12 +4130,80 @@ <h3 id=selecting-certain-named-pages><span class=secno>13.1.
41304130</ pre >
41314131 </ div >
41324132
4133- < h3 id =page-groups- > < span class =secno > 13.2. </ span > Page groups</ h3 >
4133+ < h3 id =selecting-elements-within-pages-and-colu > < span class =secno > 13.2.
4134+ </ span > Selecting elements within pages and columns</ h3 >
4135+
4136+ < p > The ‘< code class =css > page()</ code > ’ and ‘< code
4137+ class =css > column()</ code > ’ pseudo-element allows the selection of pages,
4138+ columns, and elements within.
4139+
4140+ < div class =example >
4141+ < pre >
4142+ article::column(2n) { /* select every other column of an article */
4143+ ...
4144+ }
4145+ </ pre >
4146+ </ div >
4147+
4148+ < div class =example >
4149+ < pre >
4150+ article::page(left) { /* select all left pages in an article */
4151+ background: pink;
4152+ }
4153+ </ pre >
4154+ </ div >
4155+
4156+ < div class =example >
4157+ < pre >
4158+ article::page(left) p { /* select all p elements that appear on left pages in an article */
4159+ text-align: left;
4160+ }
4161+ </ pre >
4162+ </ div >
4163+
4164+ < p > It is also possible to place the code inside @page:
4165+
4166+ < div class =example >
4167+ < p > These are identical:
4168+
4169+ < pre >
4170+ @page :left {
4171+ {
4172+ p { text-align: left }
4173+ }
4174+ }
4175+
4176+ ::page(left) p { text-align: left }
4177+ </ pre >
4178+ </ div >
4179+
4180+ < p class =issue > Is "left" a pseudo-class or pseudo-element? In @page,
4181+ ":left" is a pseudo-class. However, when we select elements on left pages,
4182+ it acts like a pseudo-element.
4183+
4184+ < div class =example >
4185+ < pre >
4186+ @page :left {
4187+ background: pink; /* declaration applies to pages */
4188+ {
4189+ p { text-align: left } /* declaration applies to elements on page */
4190+ }
4191+ @top-center {
4192+ background: orange; /* declaration applies to margin box */
4193+ {
4194+ p { text-align: left } /* declaration applies to elements in margin box */
4195+ }
4196+ }
4197+ }
4198+ </ pre >
4199+ </ div >
4200+
4201+ < h3 id =page-groups- > < span class =secno > 13.3. </ span > Page groups</ h3 >
41344202
41354203 < p > Named pages can appear in sequence, stemming from different elements. A
4136- sequnce of named pages is called a < em > page group</ em > . The ‘ < a
4137- href ="#page-group "> < code class =property > page-group</ code > </ a > ’ property
4138- expresses whether an element starts a new page group or not.
4204+ sequnce of named pages with the same name is called a < em > page group</ em > .
4205+ The ‘ < a href ="#page-group "> < code class =property > page-group</ code > </ a > ’
4206+ property expresses whether an element starts a new page group or not.
41394207
41404208 < table class =propdef >
41414209 < tbody >
@@ -4193,15 +4261,15 @@ <h3 id=page-groups-><span class=secno>13.2. </span>Page groups</h3>
41934261
41944262 < dt > start
41954263
4196- < dd > The element starts a new page group.
4264+ < dd > The element always starts a new page group.
41974265 </ dl >
41984266
41994267 < div class =example >
42004268 < p > In this example, each article starts a new page group so that the first
42014269 page of each article has a pink background.
42024270
42034271 < pre >
4204- @page funky:first-page {
4272+ @page funky:first {
42054273 background: pink;
42064274}
42074275article {
@@ -4214,57 +4282,6 @@ <h3 id=page-groups-><span class=secno>13.2. </span>Page groups</h3>
42144282 only the first page of the first article would be pink.
42154283 </ div >
42164284
4217- < h3 id =page-and-column-pseudo-elements > < span class =secno > 13.3.
4218- </ span > ‘< code class =property > page</ code > ’ and ‘< code
4219- class =property > column</ code > ’ pseudo-elements</ h3 >
4220-
4221- < p > The ‘< code class =css > page()</ code > ’ and ‘< code
4222- class =css > column()</ code > ’ pseudo-element allows the selection of pages,
4223- columns, and elements within.
4224-
4225- < div class =example >
4226- < pre >
4227- article::column(2n) { /* select every other column of an article */
4228- ...
4229- }
4230- </ pre >
4231- </ div >
4232-
4233- < div class =example >
4234- < pre >
4235- article::page(left) { /* select all left pages in an article */
4236- background: pink;
4237- }
4238- </ pre >
4239- </ div >
4240-
4241- < div class =example >
4242- < pre >
4243- article::page(left) p { /* select all p elements that appear on left pages in an article */
4244- text-align: left;
4245- }
4246- </ pre >
4247- </ div >
4248-
4249- < p > It is also possible to place the code inside @page:
4250-
4251- < div class =example >
4252- < pre >
4253- @page :left {
4254- background: pink; /* declaration applies to pages */
4255- {
4256- p { text-align: left } /* declaration applies to elements on page */
4257- }
4258- @top-center {
4259- background: orange; /* declaration applies to margin box */
4260- {
4261- p { text-align: left } /* declaration applies to elements in margin box */
4262- }
4263- }
4264- }
4265- </ pre >
4266- </ div >
4267-
42684285 < h2 id =selecting-lines > < span class =secno > 14. </ span > Selecting lines</ h2 >
42694286
42704287 < p > The ‘< code class =property > first-line</ code > ’ pseudo-element selects
@@ -4899,7 +4916,7 @@ <h2 class=no-num id=index>Index</h2>
48994916 title ="section 1. "> < strong > 1.</ strong > </ a >
49004917
49014918 < li > page-group, < a href ="#page-group "
4902- title ="section 13.2 . "> < strong > 13.2 .</ strong > </ a >
4919+ title ="section 13.3 . "> < strong > 13.3 .</ strong > </ a >
49034920
49044921 < li > running elements, < a href ="#running-elements0 "
49054922 title ="section 1. "> < strong > 1.</ strong > </ a >
0 commit comments