auto-print / files / assets / print.css
print.css
| 1 | /* Styles for the PDF output. Chrome prints the pandoc HTML with these rules. */ |
| 2 | |
| 3 | @page { |
| 4 | size: Letter; |
| 5 | margin: 1in; |
| 6 | @bottom-center { |
| 7 | content: counter(page); |
| 8 | font-family: Georgia, "Times New Roman", serif; |
| 9 | font-size: 10pt; |
| 10 | color: #555; |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | /* No page number on the title page. */ |
| 15 | @page :first { |
| 16 | @bottom-center { |
| 17 | content: none; |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | html, |
| 22 | body { |
| 23 | max-width: none; |
| 24 | margin: 0; |
| 25 | padding: 0; |
| 26 | background: white; |
| 27 | color: black; |
| 28 | } |
| 29 | |
| 30 | body { |
| 31 | font-family: Georgia, "Times New Roman", serif; |
| 32 | font-size: 12pt; |
| 33 | line-height: 1.5; |
| 34 | hyphens: manual; |
| 35 | } |
| 36 | |
| 37 | /* Title page: title and author, alone on the first page. */ |
| 38 | #title-block-header { |
| 39 | text-align: center; |
| 40 | padding-top: 3in; |
| 41 | break-after: page; |
| 42 | } |
| 43 | |
| 44 | #title-block-header h1.title { |
| 45 | font-size: 32pt; |
| 46 | margin: 0 0 0.5in 0; |
| 47 | } |
| 48 | |
| 49 | #title-block-header p.author { |
| 50 | font-size: 16pt; |
| 51 | } |
| 52 | |
| 53 | #title-block-header p.date { |
| 54 | display: none; |
| 55 | } |
| 56 | |
| 57 | /* Pages before and after the story, such as a dedication, start on a new page. */ |
| 58 | .page-break { |
| 59 | break-before: page; |
| 60 | } |
| 61 | |
| 62 | /* The dedication: centered, in italics, about a third of the way down the page. */ |
| 63 | .dedication { |
| 64 | text-align: center; |
| 65 | font-style: italic; |
| 66 | padding-top: 2.5in; |
| 67 | } |
| 68 | |
| 69 | /* Chapter headings. Chapters flow continuously, they do not start new pages. */ |
| 70 | h1, |
| 71 | h2, |
| 72 | h3 { |
| 73 | font-family: Helvetica, Arial, sans-serif; |
| 74 | line-height: 1.25; |
| 75 | break-after: avoid; |
| 76 | } |
| 77 | |
| 78 | h1 { |
| 79 | font-size: 15pt; |
| 80 | margin: 2.2em 0 0.8em 0; |
| 81 | } |
| 82 | |
| 83 | h2 { |
| 84 | font-size: 13pt; |
| 85 | margin: 1.8em 0 0.6em 0; |
| 86 | } |
| 87 | |
| 88 | p { |
| 89 | margin: 0 0 0.8em 0; |
| 90 | orphans: 2; |
| 91 | widows: 2; |
| 92 | } |
| 93 | |
| 94 | img { |
| 95 | max-width: 100%; |
| 96 | height: auto; |
| 97 | } |
| 98 | |
| 99 | hr { |
| 100 | border: none; |
| 101 | text-align: center; |
| 102 | margin: 1.5em 0; |
| 103 | } |
| 104 | |
| 105 | hr::after { |
| 106 | content: "* * *"; |
| 107 | } |
| 108 | |
| 109 | /* Inline code, used in the stories for machine or ship speech. */ |
| 110 | code { |
| 111 | font-family: Menlo, Consolas, monospace; |
| 112 | font-size: 0.85em; |
| 113 | } |