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
The objective here is to have 3 pages [chapterhead, typical, typical] where the first page is the h2 and whatever amount of the p will fit on the rest of the "chapterhead" page and then run into the "typical" pages.
current spec says that this should result in 4 pages [chapterhead, typical, typical, typical] where h2 exists on its own page, despite break-after set to avoid-page.
I would argue that if I wanted this I would put page: typical on the p style instead of main or remove the break-after: avoid-page from the h2 - or something similar.
it is worth noting that if I remove page: typical from main and let it use the unnamed page, the behaviour I desire manifests, however this means you can only ever use the one unnamed page style, which limits styling potential for different major sections and the like.
Point is, there is no mechanism to allow text to continue to flow on whatever named page when another named page is used as a sections "default" (for lack of a better term).
PrinceXML seems to solve this use case by implementing a -prince-page-group property which can be "auto" or "start" where a value of "start" will let a page with an h2 by targeted by the :first pseudo-selector. https://www.princexml.com/doc/css-props/#prop-page-group
for example:
The text was updated successfully, but these errors were encountered:
RobMayer
changed the title
[css-page-3] - spec gap: no way to continue page flow when using two named pages.
[css-page] - spec gap: no way to continue page flow when using two named pages.
Dec 23, 2024
Supposing the following css and html
The objective here is to have 3 pages [chapterhead, typical, typical] where the first page is the
h2
and whatever amount of thep
will fit on the rest of the "chapterhead" page and then run into the "typical" pages.current spec says that this should result in 4 pages [chapterhead, typical, typical, typical] where
h2
exists on its own page, despitebreak-after
set toavoid-page
.I would argue that if I wanted this I would put
page: typical
on thep
style instead ofmain
or remove thebreak-after: avoid-page
from theh2
- or something similar.it is worth noting that if I remove
page: typical
frommain
and let it use the unnamed page, the behaviour I desire manifests, however this means you can only ever use the one unnamed page style, which limits styling potential for different major sections and the like.Point is, there is no mechanism to allow text to continue to flow on whatever named page when another named page is used as a sections "default" (for lack of a better term).
PrinceXML seems to solve this use case by implementing a
-prince-page-group
property which can be "auto" or "start" where a value of "start" will let a page with an h2 by targeted by the:first
pseudo-selector. https://www.princexml.com/doc/css-props/#prop-page-groupfor example:
The text was updated successfully, but these errors were encountered: