Skip to content

Update positioned content management#3628

Merged
bsweeney merged 3 commits intomasterfrom
fixed-content-handling
Sep 1, 2025
Merged

Update positioned content management#3628
bsweeney merged 3 commits intomasterfrom
fixed-content-handling

Conversation

@bsweeney
Copy link
Copy Markdown
Member

@bsweeney bsweeney commented Jun 29, 2025

This change:

  • Ensures consistent rendering of fixed-position elements by removing them from the document immediately before the rendering process begins. The content is inserted prior to rendering of each page.
  • Prevents infinite recursion due to forced page break styling of absolute- or fixed-position elements.
  • Prevents infinite recursion due to forced page break styling of the children of fixed-position elements.

bsweeney added 2 commits June 28, 2025 20:31
Before this change fixed-position elements were inserted before the first child of the body. Using the prepend method produces the same outcome and prevents failure if a page has no children.
Prior to this change fixed-position elements whose in-flow location was after the first page would not render on the first page and would render twice on their in-flow page.

fixes #491
@bsweeney bsweeney added this to the 3.1.1 milestone Jun 29, 2025
@bsweeney bsweeney changed the title Update fixed-position content management Update positioned content management Jun 30, 2025
@bsweeney bsweeney linked an issue Jun 30, 2025 that may be closed by this pull request
@bsweeney bsweeney force-pushed the fixed-content-handling branch from 74bfb25 to eb7878c Compare July 15, 2025 23:58
This change prevents paging of absolute- and fixed-position elements. Children of absolute-position elements will be paged, but the current implementation pushes in-flow content to the following page as well.

addresses #864
@bsweeney bsweeney force-pushed the fixed-content-handling branch from eb7878c to e76b9d7 Compare July 16, 2025 01:08
@bsweeney bsweeney merged commit 26d2bb5 into master Sep 1, 2025
35 checks passed
@bsweeney bsweeney deleted the fixed-content-handling branch September 1, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

p { page-break-after: always; } causes infinite loop Positioned content is applied starting with page 2 instead of the start of the document

1 participant