Skip to content

Commit

Permalink
#364 Failing test for position: fixed content.
Browse files Browse the repository at this point in the history
It is sitting above the footnotes.
  • Loading branch information
danfickle committed Aug 1, 2021
1 parent f92575b commit d33008f
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<html>
<head>
<style>
@page {
size: 250px 300px;
}
@page {
@footnote {
float: bottom;
box-sizing: border-box;
width: 100%;
border: 1px solid green;
max-height: 65%;
}
}
body {
margin: 0 10px;
font-size: 18px;

/* When there is limited space for lines (such as with large footnote area)
then orphans and widows can create undesirable layout. */
orphans: 0;
widows: 0;
}
::footnote-call {
counter-increment: footnote 1;
}
span.footnote {
float: footnote;
}
.footnote::footnote-call {
content: "[" counter(footnote) "]";
}
.footnote::footnote-marker {
content: counter(footnote) ". ";
}
</style>
</head>
<body>
<p style="margin-top: 0;">
This text needs some footnotes. <span id="1" class="footnote">This is a footnote.</span>
Also a footnote for this sentence. <span id="2" class="footnote">Another <strong>footnote</strong>!</span>
</p>

<p style="page-break-before: always;">
Footnote numbers. <span id="3" class="footnote">Just to be silly this is a really long footnote that will need wrapping and such.</span>
</p>

<div style="background: blue; position: fixed; bottom: 0; left: 40%; width: 40%; height: 50px;"></div>
<div style="background: red; position: absolute; bottom: 0; left: 0; width: 40%; height: 50px;"></div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,14 @@ public void testIssue364FootnotesBlocks() throws IOException {
public void testIssue364FootnotesPaginatedTable() throws IOException {
assertTrue(vt.runTest("issue-364-footnotes-paginated-table"));
}

/**
* Tests that positon: absolute and fixed content with bottom: 0 sits
* above footnotes.
*/
@Test
public void testIssue364FootnotesPositionedContent() throws IOException {
assertTrue(vt.runTest("issue-364-footnotes-positioned-content"));
}

}

0 comments on commit d33008f

Please sign in to comment.