Commit 30083f7a authored by Fred Chasen's avatar Fred Chasen
Browse files

Update footnotes specs

parent 485d1ddf
Pipeline #719 passed with stage
in 3 minutes and 55 seconds
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Style-Type" content="text/css" />
<title> <title>
Footnotes Footnotes Display
</title> </title>
<!-- Paged js--> <!-- Paged js-->
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
span.footnote-block { span.footnote-block {
float: footnote; float: footnote;
footnote-display: blcok; footnote-display: block;
} }
.footnote-block::footnote-call { .footnote-block::footnote-call {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Style-Type" content="text/css" />
<title> <title>
Footnotes Footnotes Policy
</title> </title>
<!-- Paged js--> <!-- Paged js-->
...@@ -68,7 +68,6 @@ ...@@ -68,7 +68,6 @@
span.footnote-auto { span.footnote-auto {
float: footnote; float: footnote;
footnote-policy: auto; footnote-policy: auto;
footnote-display: compact;
} }
.footnote-auto::footnote-call { .footnote-auto::footnote-call {
...@@ -82,7 +81,6 @@ ...@@ -82,7 +81,6 @@
span.footnote-line { span.footnote-line {
float: footnote; float: footnote;
footnote-policy: line; footnote-policy: line;
footnote-display: compact;
} }
.footnote-line::footnote-call { .footnote-line::footnote-call {
...@@ -96,7 +94,6 @@ ...@@ -96,7 +94,6 @@
span.footnote-block { span.footnote-block {
float: footnote; float: footnote;
footnote-policy: block; footnote-policy: block;
footnote-display: compact;
} }
.footnote-block::footnote-call { .footnote-block::footnote-call {
......
...@@ -21,6 +21,36 @@ describe("footnote-policy", () => { ...@@ -21,6 +21,36 @@ describe("footnote-policy", () => {
expect(pages).toEqual(6); expect(pages).toEqual(6);
}); });
it("display auto footnotes should split text", async () => {
let textStart = await page.$eval("[data-page-number='1']", (r) => r.textContent);
expect(textStart).toContain("Characteres");
let textEnd = await page.$eval("[data-page-number='2']", (r) => r.textContent);
expect(textEnd).toContain("genus typos me vidisse");
});
it("display line footnotes should stay with the callout line", async () => {
let textStart = await page.$eval("[data-page-number='4']", (r) => r.textContent);
// line
expect(textStart).toContain("Strasburg");
// footnote
expect(textStart).toContain("Argentoratensi");
});
it("display block footnotes should stay with the callout paragraph block", async () => {
let textStart = await page.$eval("[data-page-number='6']", (r) => r.textContent);
// paragraph
expect(textStart).toContain("The legend");
// footnote
expect(textStart).toContain("Argentoratensi");
});
if (!DEBUG) { if (!DEBUG) {
it("should create a pdf", async () => { it("should create a pdf", async () => {
...@@ -29,6 +59,7 @@ describe("footnote-policy", () => { ...@@ -29,6 +59,7 @@ describe("footnote-policy", () => {
expect(pdf).toMatchPDFSnapshot(2); expect(pdf).toMatchPDFSnapshot(2);
expect(pdf).toMatchPDFSnapshot(3); expect(pdf).toMatchPDFSnapshot(3);
expect(pdf).toMatchPDFSnapshot(4); expect(pdf).toMatchPDFSnapshot(4);
expect(pdf).toMatchPDFSnapshot(6);
}); });
} }
} }
......
...@@ -16,18 +16,15 @@ ...@@ -16,18 +16,15 @@
orphans: 1; orphans: 1;
} }
@media screen {
.pagedjs_page { .pagedjs_page {
border: 1px solid #666; box-shadow: 0 0 0 1px #666;
} }
.pagedjs_area { .pagedjs_area {
box-shadow: 0 0 0 1px teal; box-shadow: 0 0 0 1px teal;
} }
}
@page { @page {
size: 160mm 210mm; size: 160mm 210mm;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment