@threepenny/md2pdf 2.2.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/bin/md2pdf.js +4 -0
- package/lib/styles.js +4 -0
- package/package.json +1 -1
- package/styles/cyberpunk.css +694 -0
- package/styles/elvish.css +643 -0
- package/styles/fonts/chakra-petch/OFL.txt +93 -0
- package/styles/fonts/chakra-petch/chakra-petch-latin-400-italic.woff2 +0 -0
- package/styles/fonts/chakra-petch/chakra-petch-latin-400-normal.woff2 +0 -0
- package/styles/fonts/chakra-petch/chakra-petch-latin-700-italic.woff2 +0 -0
- package/styles/fonts/chakra-petch/chakra-petch-latin-700-normal.woff2 +0 -0
- package/styles/fonts/cormorant-garamond/OFL.txt +93 -0
- package/styles/fonts/cormorant-garamond/cormorant-garamond-latin-500-italic.woff2 +0 -0
- package/styles/fonts/cormorant-garamond/cormorant-garamond-latin-500-normal.woff2 +0 -0
- package/styles/fonts/cormorant-garamond/cormorant-garamond-latin-700-italic.woff2 +0 -0
- package/styles/fonts/cormorant-garamond/cormorant-garamond-latin-700-normal.woff2 +0 -0
- package/styles/fonts/cormorant-unicase/OFL.txt +93 -0
- package/styles/fonts/cormorant-unicase/cormorant-unicase-latin-600-normal.woff2 +0 -0
- package/styles/fonts/grenze-gotisch/OFL.txt +93 -0
- package/styles/fonts/grenze-gotisch/grenze-gotisch-latin-600-normal.woff2 +0 -0
- package/styles/fonts/im-fell-english/OFL.txt +93 -0
- package/styles/fonts/im-fell-english/im-fell-english-latin-400-italic.woff2 +0 -0
- package/styles/fonts/im-fell-english/im-fell-english-latin-400-normal.woff2 +0 -0
- package/styles/fonts/jetbrains-mono/OFL.txt +93 -0
- package/styles/fonts/jetbrains-mono/jetbrains-mono-latin-400-italic.woff2 +0 -0
- package/styles/fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2 +0 -0
- package/styles/fonts/jetbrains-mono/jetbrains-mono-latin-700-normal.woff2 +0 -0
- package/styles/fonts/michroma/OFL.txt +93 -0
- package/styles/fonts/michroma/michroma-latin-400-normal.woff2 +0 -0
- package/styles/fonts/space-mono/OFL.txt +93 -0
- package/styles/fonts/space-mono/space-mono-latin-400-italic.woff2 +0 -0
- package/styles/fonts/space-mono/space-mono-latin-400-normal.woff2 +0 -0
- package/styles/fonts/space-mono/space-mono-latin-700-normal.woff2 +0 -0
- package/styles/fonts/spectral/OFL.txt +93 -0
- package/styles/fonts/spectral/spectral-latin-400-italic.woff2 +0 -0
- package/styles/fonts/spectral/spectral-latin-400-normal.woff2 +0 -0
- package/styles/fonts/spectral/spectral-latin-600-italic.woff2 +0 -0
- package/styles/fonts/spectral/spectral-latin-600-normal.woff2 +0 -0
- package/styles/gothic.css +474 -0
- package/styles/print/cyberpunk.css +92 -0
- package/styles/print/elvish.css +69 -0
- package/styles/print/gothic.css +29 -0
- package/styles/print/sandwake.css +47 -0
- package/styles/sandwake.css +540 -0
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
/* Gothic: a page from an old book of dread. Blackletter titles and section headings and a
|
|
2
|
+
seventeenth-century book face (both bundled), oxblood for the title and main headings, ornaments,
|
|
3
|
+
quote bars and table rules, a drop cap after the title and a leaf ornament for rules. No page
|
|
4
|
+
background: the paper stays white up to its edges. */
|
|
5
|
+
|
|
6
|
+
/* Variables a page can override, on .markdown-body itself: for all its documents, or for one with
|
|
7
|
+
<article class="markdown-body" style="--md2pdf-font-size: 13pt">. A value set on :root or another
|
|
8
|
+
ancestor doesn't reach the document. :where() gives these defaults no specificity, so the page's
|
|
9
|
+
rule wins wherever it comes. Every style uses the same names. */
|
|
10
|
+
:where(.markdown-body) {
|
|
11
|
+
/* Size and spacing. --md2pdf-font-size is the body text size, an absolute length such as 12pt or 16px; headings and smaller text scale with
|
|
12
|
+
it. --md2pdf-leading scales each line height's excess over 1, and --md2pdf-space the vertical
|
|
13
|
+
gaps between blocks; both are 1 as designed. */
|
|
14
|
+
--md2pdf-font-size: 12pt;
|
|
15
|
+
--md2pdf-leading: 1;
|
|
16
|
+
--md2pdf-space: 1;
|
|
17
|
+
/* Colors: --md2pdf-background the document's background; --md2pdf-text body text; --md2pdf-muted
|
|
18
|
+
secondary text; --md2pdf-accent h1, h2 and h4, the drop cap, links, list markers, quote bars,
|
|
19
|
+
tick boxes, caution callouts, table headings and rules, and the footnote rule (the leaf ornaments
|
|
20
|
+
stay oxblood); --md2pdf-rule thin rules and borders;
|
|
21
|
+
--md2pdf-surface code and callout backgrounds. */
|
|
22
|
+
--md2pdf-background: #fff;
|
|
23
|
+
--md2pdf-text: #1c1916;
|
|
24
|
+
--md2pdf-muted: #5f574e;
|
|
25
|
+
--md2pdf-accent: #7a1f1f;
|
|
26
|
+
--md2pdf-rule: #c9b9a6;
|
|
27
|
+
--md2pdf-surface: #f7f2eb;
|
|
28
|
+
/* Fonts: --md2pdf-font body text, --md2pdf-heading-font h1, h2, h3 and the drop cap,
|
|
29
|
+
--md2pdf-code-font code. */
|
|
30
|
+
--md2pdf-font: "md2pdf IM Fell English", "Iowan Old Style", Palatino, Georgia, serif;
|
|
31
|
+
--md2pdf-heading-font: "md2pdf Grenze Gotisch", var(--md2pdf-font);
|
|
32
|
+
--md2pdf-code-font: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* IM Fell English (Igino Marini) and Grenze Gotisch (Omnibus-Type), both under the SIL Open Font
|
|
36
|
+
License; the licences are in fonts/im-fell-english/OFL.txt and fonts/grenze-gotisch/OFL.txt. Their
|
|
37
|
+
latin subsets cover English and Western European languages (Basic Latin and Latin-1, plus œ and
|
|
38
|
+
€); other letters come from the fallbacks. IM Fell has no bold, so bold text is the browser's
|
|
39
|
+
thickening of the regular face. */
|
|
40
|
+
@font-face {
|
|
41
|
+
font-family: "md2pdf IM Fell English";
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
font-style: normal;
|
|
44
|
+
src: url("fonts/im-fell-english/im-fell-english-latin-400-normal.woff2") format("woff2");
|
|
45
|
+
}
|
|
46
|
+
@font-face {
|
|
47
|
+
font-family: "md2pdf IM Fell English";
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
font-style: italic;
|
|
50
|
+
src: url("fonts/im-fell-english/im-fell-english-latin-400-italic.woff2") format("woff2");
|
|
51
|
+
}
|
|
52
|
+
@font-face {
|
|
53
|
+
font-family: "md2pdf Grenze Gotisch";
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
font-style: normal;
|
|
56
|
+
src: url("fonts/grenze-gotisch/grenze-gotisch-latin-600-normal.woff2") format("woff2");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.markdown-body {
|
|
60
|
+
font-family: var(--md2pdf-font);
|
|
61
|
+
background: var(--md2pdf-background);
|
|
62
|
+
font-size: var(--md2pdf-font-size);
|
|
63
|
+
line-height: calc(1 + 0.5 * var(--md2pdf-leading));
|
|
64
|
+
color: var(--md2pdf-text);
|
|
65
|
+
/* A long web address wraps at the margin instead of making Chrome shrink the page to fit it. */
|
|
66
|
+
overflow-wrap: break-word;
|
|
67
|
+
font-kerning: normal;
|
|
68
|
+
-webkit-print-color-adjust: exact;
|
|
69
|
+
print-color-adjust: exact;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.markdown-body p,
|
|
73
|
+
.markdown-body li {
|
|
74
|
+
text-align: justify;
|
|
75
|
+
hyphens: auto;
|
|
76
|
+
orphans: 3;
|
|
77
|
+
widows: 3;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.markdown-body p {
|
|
81
|
+
margin: 0 0 calc(0.75em * var(--md2pdf-space));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* The leaf ornament under the title and in place of --- rules: a hedera between two hairlines. The
|
|
85
|
+
fonts have no ornaments of their own. It's an image in the accent's oxblood, so it keeps that color
|
|
86
|
+
when --md2pdf-accent changes: a mask would follow the variable, but Chrome prints a solid block
|
|
87
|
+
beside a masked element. */
|
|
88
|
+
.markdown-body h1::after,
|
|
89
|
+
.markdown-body hr::after {
|
|
90
|
+
content: "";
|
|
91
|
+
display: block;
|
|
92
|
+
height: 1.1em;
|
|
93
|
+
margin: 0 auto;
|
|
94
|
+
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cg fill='none' stroke='%237a1f1f'%3E%3Cpath d='M4 12H44M80 12H116' stroke-width='1'/%3E%3Cpath d='M54 12C50.5 12 47.5 10 48 7.6C48.4 5.8 50.6 5.6 51.2 7' stroke-width='1.3'/%3E%3C/g%3E%3Cpath fill='%237a1f1f' transform='translate(50 0) rotate(-90 12 12)' d='M12 21C5 15 1 11 1 7C1 3.5 4 1 7 1C9.5 1 11 2.5 12 4C13 2.5 14.5 1 17 1C20 1 23 3.5 23 7C23 11 19 15 12 21Z'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Headings */
|
|
98
|
+
|
|
99
|
+
.markdown-body h1,
|
|
100
|
+
.markdown-body h2,
|
|
101
|
+
.markdown-body h3,
|
|
102
|
+
.markdown-body h4,
|
|
103
|
+
.markdown-body h5,
|
|
104
|
+
.markdown-body h6 {
|
|
105
|
+
font-weight: normal;
|
|
106
|
+
line-height: calc(1 + 0.2 * var(--md2pdf-leading));
|
|
107
|
+
break-after: avoid;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.markdown-body h1,
|
|
111
|
+
.markdown-body h2,
|
|
112
|
+
.markdown-body h3 {
|
|
113
|
+
font-family: var(--md2pdf-heading-font);
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
color: var(--md2pdf-accent);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.markdown-body h1 {
|
|
119
|
+
font-size: calc(34 / 12 * var(--md2pdf-font-size));
|
|
120
|
+
text-align: center;
|
|
121
|
+
margin: 0 0 calc(0.75em * var(--md2pdf-space));
|
|
122
|
+
/* The ornament is a block inside the heading; without this a page can break between them. */
|
|
123
|
+
break-inside: avoid;
|
|
124
|
+
}
|
|
125
|
+
.markdown-body h1::after {
|
|
126
|
+
width: 5.5em;
|
|
127
|
+
height: 0.5em;
|
|
128
|
+
margin-top: calc(0.3em * var(--md2pdf-space));
|
|
129
|
+
}
|
|
130
|
+
/* Any later h1 starts a new section with a bit more air. */
|
|
131
|
+
.markdown-body h1:not(:first-child) {
|
|
132
|
+
margin-top: calc(1.6em * var(--md2pdf-space));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.markdown-body h2 {
|
|
136
|
+
font-size: calc(21 / 12 * var(--md2pdf-font-size));
|
|
137
|
+
margin: calc(1.5em * var(--md2pdf-space)) 0 calc(0.45em * var(--md2pdf-space));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.markdown-body h3 {
|
|
141
|
+
font-size: calc(16 / 12 * var(--md2pdf-font-size));
|
|
142
|
+
color: var(--md2pdf-text);
|
|
143
|
+
margin: calc(1.4em * var(--md2pdf-space)) 0 calc(0.4em * var(--md2pdf-space));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.markdown-body h4,
|
|
147
|
+
.markdown-body h5,
|
|
148
|
+
.markdown-body h6 {
|
|
149
|
+
font-size: var(--md2pdf-font-size);
|
|
150
|
+
font-style: italic;
|
|
151
|
+
margin: calc(1.2em * var(--md2pdf-space)) 0 calc(0.3em * var(--md2pdf-space));
|
|
152
|
+
}
|
|
153
|
+
.markdown-body h4 {
|
|
154
|
+
color: var(--md2pdf-accent);
|
|
155
|
+
font-size: calc(13 / 12 * var(--md2pdf-font-size));
|
|
156
|
+
}
|
|
157
|
+
.markdown-body h6 {
|
|
158
|
+
color: var(--md2pdf-muted);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* The drop cap: the first letter of the paragraph under the document's title, sunk three lines deep
|
|
162
|
+
where the browser can size it to the lines (Chrome and Safari). Elsewhere (Firefox) it's a raised
|
|
163
|
+
initial, standing on the first line, since sinking it by hand depends on the font's measurements.
|
|
164
|
+
A paragraph whose first element is code or a key, directly or inside a link or other wrapper, has none:
|
|
165
|
+
its first letter would leave the code's box behind, empty. CSS can't tell whether text comes
|
|
166
|
+
before it, so that paragraph loses the drop cap too. */
|
|
167
|
+
.markdown-body > h1:first-child + p:not(:has(> code:first-child)):not(:has(> kbd:first-child)):not(:has(> :first-child > code:first-child)):not(:has(> :first-child > kbd:first-child))::first-letter {
|
|
168
|
+
font-family: var(--md2pdf-heading-font);
|
|
169
|
+
font-weight: 600;
|
|
170
|
+
color: var(--md2pdf-accent);
|
|
171
|
+
}
|
|
172
|
+
@supports not ((initial-letter: 3) or (-webkit-initial-letter: 3)) {
|
|
173
|
+
.markdown-body > h1:first-child + p:not(:has(> code:first-child)):not(:has(> kbd:first-child)):not(:has(> :first-child > code:first-child)):not(:has(> :first-child > kbd:first-child))::first-letter {
|
|
174
|
+
font-size: 3em;
|
|
175
|
+
line-height: 1;
|
|
176
|
+
margin-right: 0.03em;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
|
|
180
|
+
/* A paragraph shorter than the letter grows to hold it, so the next block doesn't wrap around it. */
|
|
181
|
+
.markdown-body > h1:first-child + p:not(:has(> code:first-child)):not(:has(> kbd:first-child)):not(:has(> :first-child > code:first-child)):not(:has(> :first-child > kbd:first-child)) {
|
|
182
|
+
display: flow-root;
|
|
183
|
+
}
|
|
184
|
+
.markdown-body > h1:first-child + p:not(:has(> code:first-child)):not(:has(> kbd:first-child)):not(:has(> :first-child > code:first-child)):not(:has(> :first-child > kbd:first-child))::first-letter {
|
|
185
|
+
-webkit-initial-letter: 3;
|
|
186
|
+
initial-letter: 3;
|
|
187
|
+
/* Chrome ignores a sunk letter's margin, so the gap is padding, in body-text units. */
|
|
188
|
+
padding-right: calc(0.35 * var(--md2pdf-font-size));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* Links */
|
|
193
|
+
|
|
194
|
+
.markdown-body a {
|
|
195
|
+
color: var(--md2pdf-accent);
|
|
196
|
+
text-decoration: none;
|
|
197
|
+
}
|
|
198
|
+
.markdown-body a.header-anchor {
|
|
199
|
+
display: none;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Lists */
|
|
203
|
+
|
|
204
|
+
.markdown-body ul,
|
|
205
|
+
.markdown-body ol {
|
|
206
|
+
margin: 0 0 calc(0.75em * var(--md2pdf-space));
|
|
207
|
+
padding-left: 1.6em;
|
|
208
|
+
}
|
|
209
|
+
.markdown-body li {
|
|
210
|
+
margin: calc(0.15em * var(--md2pdf-space)) 0;
|
|
211
|
+
}
|
|
212
|
+
.markdown-body li > ul,
|
|
213
|
+
.markdown-body li > ol {
|
|
214
|
+
margin: calc(0.15em * var(--md2pdf-space)) 0 0;
|
|
215
|
+
}
|
|
216
|
+
.markdown-body li::marker {
|
|
217
|
+
color: var(--md2pdf-accent);
|
|
218
|
+
}
|
|
219
|
+
.markdown-body .task-list-item {
|
|
220
|
+
list-style-type: none;
|
|
221
|
+
}
|
|
222
|
+
/* Boxes drawn here at the browser's size: its own are greyed out, as they're disabled. */
|
|
223
|
+
.markdown-body .task-list-item input {
|
|
224
|
+
appearance: none;
|
|
225
|
+
width: 13px;
|
|
226
|
+
height: 13px;
|
|
227
|
+
margin: 0 0.4em 0.2em -1.4em;
|
|
228
|
+
vertical-align: middle;
|
|
229
|
+
border: 1px solid var(--md2pdf-accent);
|
|
230
|
+
border-radius: 1px;
|
|
231
|
+
background: var(--md2pdf-background);
|
|
232
|
+
}
|
|
233
|
+
.markdown-body .task-list-item input:checked {
|
|
234
|
+
background: var(--md2pdf-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Quotes */
|
|
238
|
+
|
|
239
|
+
.markdown-body blockquote {
|
|
240
|
+
margin: calc(1.1em * var(--md2pdf-space)) 2em;
|
|
241
|
+
padding: 0 0 0 1em;
|
|
242
|
+
border-left: 2px solid var(--md2pdf-accent);
|
|
243
|
+
font-style: italic;
|
|
244
|
+
color: #3f3832;
|
|
245
|
+
break-inside: avoid;
|
|
246
|
+
}
|
|
247
|
+
.markdown-body blockquote p {
|
|
248
|
+
text-align: left;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* Callouts (GitHub alerts and Obsidian callouts): a ruled box, its title in small capitals. */
|
|
252
|
+
|
|
253
|
+
.markdown-body .markdown-alert {
|
|
254
|
+
--md2pdf-callout: #3d5468;
|
|
255
|
+
margin: calc(1.1em * var(--md2pdf-space)) 0;
|
|
256
|
+
padding: 0.55em 1em 0.6em;
|
|
257
|
+
border-left: 2px solid var(--md2pdf-callout);
|
|
258
|
+
background: var(--md2pdf-surface);
|
|
259
|
+
break-inside: avoid;
|
|
260
|
+
}
|
|
261
|
+
.markdown-body .markdown-alert-tip {
|
|
262
|
+
--md2pdf-callout: #45603a;
|
|
263
|
+
}
|
|
264
|
+
.markdown-body .markdown-alert-important {
|
|
265
|
+
--md2pdf-callout: #5e3f6b;
|
|
266
|
+
}
|
|
267
|
+
.markdown-body .markdown-alert-warning {
|
|
268
|
+
--md2pdf-callout: #845d12;
|
|
269
|
+
}
|
|
270
|
+
.markdown-body .markdown-alert-caution {
|
|
271
|
+
--md2pdf-callout: var(--md2pdf-accent);
|
|
272
|
+
}
|
|
273
|
+
.markdown-body .markdown-alert-quote {
|
|
274
|
+
--md2pdf-callout: var(--md2pdf-muted);
|
|
275
|
+
}
|
|
276
|
+
.markdown-body .markdown-alert-title {
|
|
277
|
+
margin-bottom: calc(0.3em * var(--md2pdf-space));
|
|
278
|
+
color: var(--md2pdf-callout);
|
|
279
|
+
font-variant: small-caps;
|
|
280
|
+
letter-spacing: 0.05em;
|
|
281
|
+
text-align: left;
|
|
282
|
+
hyphens: manual;
|
|
283
|
+
}
|
|
284
|
+
.markdown-body .markdown-alert-title .octicon {
|
|
285
|
+
margin-right: 0.45em;
|
|
286
|
+
vertical-align: -0.1em;
|
|
287
|
+
width: 0.85em;
|
|
288
|
+
height: 0.85em;
|
|
289
|
+
fill: currentColor;
|
|
290
|
+
}
|
|
291
|
+
.markdown-body .markdown-alert > :last-child {
|
|
292
|
+
margin-bottom: 0;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/* Code */
|
|
296
|
+
|
|
297
|
+
.markdown-body code,
|
|
298
|
+
.markdown-body kbd {
|
|
299
|
+
font-family: var(--md2pdf-code-font);
|
|
300
|
+
font-size: 0.78em;
|
|
301
|
+
}
|
|
302
|
+
.markdown-body :not(pre) > code {
|
|
303
|
+
background: var(--md2pdf-surface);
|
|
304
|
+
padding: 0.1em 0.3em;
|
|
305
|
+
border-radius: 2px;
|
|
306
|
+
}
|
|
307
|
+
.markdown-body kbd {
|
|
308
|
+
padding: 0.05em 0.35em;
|
|
309
|
+
border: 1px solid var(--md2pdf-rule);
|
|
310
|
+
border-bottom-width: 2px;
|
|
311
|
+
border-radius: 2px;
|
|
312
|
+
background: var(--md2pdf-background);
|
|
313
|
+
}
|
|
314
|
+
.markdown-body pre {
|
|
315
|
+
background: var(--md2pdf-surface);
|
|
316
|
+
border: 1px solid var(--md2pdf-rule);
|
|
317
|
+
border-radius: 2px;
|
|
318
|
+
padding: 0.9em 1.1em;
|
|
319
|
+
margin: 0 0 calc(1em * var(--md2pdf-space));
|
|
320
|
+
line-height: calc(1 + 0.45 * var(--md2pdf-leading));
|
|
321
|
+
white-space: pre-wrap;
|
|
322
|
+
word-break: break-word;
|
|
323
|
+
break-inside: avoid;
|
|
324
|
+
}
|
|
325
|
+
.markdown-body pre code {
|
|
326
|
+
font-size: calc(8.5 / 12 * var(--md2pdf-font-size));
|
|
327
|
+
}
|
|
328
|
+
/* A highlight.js theme on the host page styles .hljs too; keep code blocks this style's own. */
|
|
329
|
+
.markdown-body pre code.hljs {
|
|
330
|
+
display: inline;
|
|
331
|
+
overflow: visible;
|
|
332
|
+
padding: 0;
|
|
333
|
+
color: inherit;
|
|
334
|
+
background: none;
|
|
335
|
+
}
|
|
336
|
+
/* And its tokens: this outranks a theme's token rules, and this style's colors come after it. */
|
|
337
|
+
.markdown-body [class*="hljs-"] {
|
|
338
|
+
color: inherit;
|
|
339
|
+
background: none;
|
|
340
|
+
font-style: inherit;
|
|
341
|
+
font-weight: inherit;
|
|
342
|
+
text-decoration: none;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/* Muted, inky syntax colors. */
|
|
346
|
+
.markdown-body .hljs-comment,
|
|
347
|
+
.markdown-body .hljs-quote {
|
|
348
|
+
color: #6e665d;
|
|
349
|
+
font-style: italic;
|
|
350
|
+
}
|
|
351
|
+
.markdown-body .hljs-keyword,
|
|
352
|
+
.markdown-body .hljs-selector-tag,
|
|
353
|
+
.markdown-body .hljs-literal,
|
|
354
|
+
.markdown-body .hljs-doctag {
|
|
355
|
+
color: #8f2424;
|
|
356
|
+
}
|
|
357
|
+
.markdown-body .hljs-string,
|
|
358
|
+
.markdown-body .hljs-regexp,
|
|
359
|
+
.markdown-body .hljs-addition {
|
|
360
|
+
color: #4a6339;
|
|
361
|
+
}
|
|
362
|
+
.markdown-body .hljs-number,
|
|
363
|
+
.markdown-body .hljs-symbol,
|
|
364
|
+
.markdown-body .hljs-bullet {
|
|
365
|
+
color: #85560a;
|
|
366
|
+
}
|
|
367
|
+
.markdown-body .hljs-title,
|
|
368
|
+
.markdown-body .hljs-section,
|
|
369
|
+
.markdown-body .hljs-name {
|
|
370
|
+
color: #2f4760;
|
|
371
|
+
}
|
|
372
|
+
.markdown-body .hljs-built_in,
|
|
373
|
+
.markdown-body .hljs-type,
|
|
374
|
+
.markdown-body .hljs-attr,
|
|
375
|
+
.markdown-body .hljs-attribute,
|
|
376
|
+
.markdown-body .hljs-variable,
|
|
377
|
+
.markdown-body .hljs-template-variable {
|
|
378
|
+
color: #5f4470;
|
|
379
|
+
}
|
|
380
|
+
.markdown-body .hljs-meta,
|
|
381
|
+
.markdown-body .hljs-deletion {
|
|
382
|
+
color: #8f2424;
|
|
383
|
+
}
|
|
384
|
+
.markdown-body .hljs-emphasis {
|
|
385
|
+
font-style: italic;
|
|
386
|
+
}
|
|
387
|
+
.markdown-body .hljs-strong {
|
|
388
|
+
font-weight: bold;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/* Tables: oxblood rules above, below and under the heading row, nothing between the columns. */
|
|
392
|
+
|
|
393
|
+
.markdown-body table {
|
|
394
|
+
border-collapse: collapse;
|
|
395
|
+
margin: calc(1.2em * var(--md2pdf-space)) auto;
|
|
396
|
+
border-top: 1.5px solid var(--md2pdf-accent);
|
|
397
|
+
border-bottom: 1.5px solid var(--md2pdf-accent);
|
|
398
|
+
}
|
|
399
|
+
.markdown-body th,
|
|
400
|
+
.markdown-body td {
|
|
401
|
+
padding: 0.35em 0.9em;
|
|
402
|
+
text-align: left;
|
|
403
|
+
}
|
|
404
|
+
.markdown-body td {
|
|
405
|
+
border-top: 0.5px solid var(--md2pdf-rule);
|
|
406
|
+
}
|
|
407
|
+
.markdown-body th {
|
|
408
|
+
font-weight: normal;
|
|
409
|
+
font-variant: small-caps;
|
|
410
|
+
letter-spacing: 0.05em;
|
|
411
|
+
color: var(--md2pdf-accent);
|
|
412
|
+
border-bottom: 0.75px solid var(--md2pdf-accent);
|
|
413
|
+
}
|
|
414
|
+
.markdown-body tr {
|
|
415
|
+
break-inside: avoid;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/* Rules and images */
|
|
419
|
+
|
|
420
|
+
.markdown-body hr {
|
|
421
|
+
border: 0;
|
|
422
|
+
margin: calc(1.4em * var(--md2pdf-space)) 0;
|
|
423
|
+
/* Firefox otherwise splits the ornament across a page break. */
|
|
424
|
+
break-inside: avoid;
|
|
425
|
+
}
|
|
426
|
+
.markdown-body hr::after {
|
|
427
|
+
width: 9em;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.markdown-body img {
|
|
431
|
+
display: block;
|
|
432
|
+
max-width: 100%;
|
|
433
|
+
margin: calc(1em * var(--md2pdf-space)) auto;
|
|
434
|
+
break-inside: avoid;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/* Footnotes */
|
|
438
|
+
|
|
439
|
+
.markdown-body hr.footnotes-sep {
|
|
440
|
+
display: none;
|
|
441
|
+
}
|
|
442
|
+
.markdown-body .footnotes {
|
|
443
|
+
margin-top: calc(2.5em * var(--md2pdf-space));
|
|
444
|
+
font-size: calc(10 / 12 * var(--md2pdf-font-size));
|
|
445
|
+
color: var(--md2pdf-muted);
|
|
446
|
+
}
|
|
447
|
+
.markdown-body .footnotes::before {
|
|
448
|
+
content: "";
|
|
449
|
+
display: block;
|
|
450
|
+
width: 30%;
|
|
451
|
+
border-top: 0.75px solid var(--md2pdf-accent);
|
|
452
|
+
margin-bottom: calc(0.8em * var(--md2pdf-space));
|
|
453
|
+
/* Keep the line on the page with the first footnote. */
|
|
454
|
+
break-after: avoid;
|
|
455
|
+
}
|
|
456
|
+
.markdown-body .footnotes ol {
|
|
457
|
+
/* Room for the numbers, which Safari sets further left than Chrome. */
|
|
458
|
+
padding-left: 2em;
|
|
459
|
+
}
|
|
460
|
+
.markdown-body .footnote-ref a,
|
|
461
|
+
.markdown-body .footnote-backref {
|
|
462
|
+
color: var(--md2pdf-accent);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/* An Obsidian embed (![[Other note]]) that can't be shown: a muted placeholder. */
|
|
466
|
+
.markdown-body .markdown-embed {
|
|
467
|
+
color: var(--md2pdf-muted);
|
|
468
|
+
font-style: italic;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/* <div class="page-break"></div> starts a new page. */
|
|
472
|
+
.markdown-body .page-break {
|
|
473
|
+
break-after: page;
|
|
474
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* Cyberpunk: the print-only rules (page margins, running headers and page numbers). Load after
|
|
2
|
+
../cyberpunk.css when printing; a page that only shows the document on screen leaves this out. */
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
/* The document's first heading, for the running header; set by the renderer or the page showing it. */
|
|
6
|
+
--document-title: "";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Margin boxes don't see the document's variables, so these repeat cyberpunk.css's label font and
|
|
10
|
+
its muted, teal and magenta colors. */
|
|
11
|
+
@page {
|
|
12
|
+
margin: 1in 0.75in 0.9in;
|
|
13
|
+
@top-left {
|
|
14
|
+
content: var(--document-title);
|
|
15
|
+
vertical-align: bottom;
|
|
16
|
+
margin-bottom: 22pt;
|
|
17
|
+
padding-bottom: 7pt;
|
|
18
|
+
border-bottom: 0.75pt solid #007a8a;
|
|
19
|
+
font-family: "md2pdf JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
|
|
20
|
+
font-size: 8.5pt;
|
|
21
|
+
letter-spacing: 0.16em;
|
|
22
|
+
text-transform: uppercase;
|
|
23
|
+
color: #5a6878;
|
|
24
|
+
}
|
|
25
|
+
/* An empty box carries the header rule across the page and stops browsers adding their own header. */
|
|
26
|
+
@top-center {
|
|
27
|
+
content: "";
|
|
28
|
+
margin-bottom: 22pt;
|
|
29
|
+
border-bottom: 0.75pt solid #007a8a;
|
|
30
|
+
}
|
|
31
|
+
@top-right {
|
|
32
|
+
content: "// Eyes only";
|
|
33
|
+
vertical-align: bottom;
|
|
34
|
+
margin-bottom: 22pt;
|
|
35
|
+
padding-bottom: 7pt;
|
|
36
|
+
border-bottom: 0.75pt solid #007a8a;
|
|
37
|
+
font-family: "md2pdf JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
|
|
38
|
+
font-size: 8.5pt;
|
|
39
|
+
letter-spacing: 0.16em;
|
|
40
|
+
text-transform: uppercase;
|
|
41
|
+
color: #d4106a;
|
|
42
|
+
}
|
|
43
|
+
@bottom-left {
|
|
44
|
+
content: "// End of page";
|
|
45
|
+
vertical-align: top;
|
|
46
|
+
margin-top: 20pt;
|
|
47
|
+
padding-top: 7pt;
|
|
48
|
+
border-top: 0.75pt solid #007a8a;
|
|
49
|
+
font-family: "md2pdf JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
|
|
50
|
+
font-size: 8.5pt;
|
|
51
|
+
letter-spacing: 0.16em;
|
|
52
|
+
text-transform: uppercase;
|
|
53
|
+
color: #5a6878;
|
|
54
|
+
}
|
|
55
|
+
@bottom-center {
|
|
56
|
+
content: "";
|
|
57
|
+
margin-top: 20pt;
|
|
58
|
+
border-top: 0.75pt solid #007a8a;
|
|
59
|
+
}
|
|
60
|
+
@bottom-right {
|
|
61
|
+
content: "PG " counter(page, decimal-leading-zero) " / " counter(pages, decimal-leading-zero);
|
|
62
|
+
vertical-align: top;
|
|
63
|
+
margin-top: 20pt;
|
|
64
|
+
padding-top: 7pt;
|
|
65
|
+
border-top: 0.75pt solid #007a8a;
|
|
66
|
+
font-family: "md2pdf JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
|
|
67
|
+
font-size: 8.5pt;
|
|
68
|
+
letter-spacing: 0.16em;
|
|
69
|
+
text-transform: uppercase;
|
|
70
|
+
color: #5a6878;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/* The title panel replaces the header on the first page. */
|
|
74
|
+
@page :first {
|
|
75
|
+
@top-left {
|
|
76
|
+
content: "";
|
|
77
|
+
border: 0;
|
|
78
|
+
}
|
|
79
|
+
@top-center {
|
|
80
|
+
border: 0;
|
|
81
|
+
}
|
|
82
|
+
@top-right {
|
|
83
|
+
content: "";
|
|
84
|
+
border: 0;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
html,
|
|
89
|
+
body {
|
|
90
|
+
margin: 0;
|
|
91
|
+
background: #fff;
|
|
92
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* Elvish: the print-only rules (page margins, running headers and page numbers). Load after
|
|
2
|
+
../elvish.css when printing; a page that only shows the document on screen leaves this out. */
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
/* The document's first heading, for the running header; set by the renderer or the page showing it. */
|
|
6
|
+
--document-title: "";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Margin boxes don't see the document's variables, so these repeat elvish.css's fonts, its muted and
|
|
10
|
+
rule colors and the stars' gold. */
|
|
11
|
+
@page {
|
|
12
|
+
margin: 1.1in 1.25in 1in;
|
|
13
|
+
/* Empty boxes carry the header rule across the page and stop browsers adding their own header. */
|
|
14
|
+
@top-left {
|
|
15
|
+
content: "";
|
|
16
|
+
margin-bottom: 26pt;
|
|
17
|
+
border-bottom: 0.75pt solid #8fa39a;
|
|
18
|
+
}
|
|
19
|
+
/* The title in capitals between two stars, in the unicase face: Chrome won't turn on lining
|
|
20
|
+
figures in a margin box, and Cormorant Garamond's old-style figures sink among capitals. */
|
|
21
|
+
@top-center {
|
|
22
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 16 16'%3E%3Cpath d='M8 0L10 6L16 8L10 10L8 16L6 10L0 8L6 6Z' fill='%23b8923a'/%3E%3C/svg%3E") "\a0\a0\a0" var(--document-title) "\a0\a0\a0" url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 16 16'%3E%3Cpath d='M8 0L10 6L16 8L10 10L8 16L6 10L0 8L6 6Z' fill='%23b8923a'/%3E%3C/svg%3E");
|
|
23
|
+
vertical-align: bottom;
|
|
24
|
+
margin-bottom: 26pt;
|
|
25
|
+
padding-bottom: 7pt;
|
|
26
|
+
border-bottom: 0.75pt solid #8fa39a;
|
|
27
|
+
font-family: "md2pdf Cormorant Unicase", "md2pdf Cormorant Garamond", "Iowan Old Style", Georgia, serif;
|
|
28
|
+
font-size: 9.75pt;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
letter-spacing: 0.18em;
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
color: #56635d;
|
|
33
|
+
}
|
|
34
|
+
@top-right {
|
|
35
|
+
content: "";
|
|
36
|
+
margin-bottom: 26pt;
|
|
37
|
+
border-bottom: 0.75pt solid #8fa39a;
|
|
38
|
+
}
|
|
39
|
+
/* The page number in italic Roman numerals between two stars. */
|
|
40
|
+
@bottom-center {
|
|
41
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 16 16'%3E%3Cpath d='M8 0L10 6L16 8L10 10L8 16L6 10L0 8L6 6Z' fill='%23b8923a'/%3E%3C/svg%3E") "\a0\a0\a0" counter(page, lower-roman) "\a0\a0\a0" url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 16 16'%3E%3Cpath d='M8 0L10 6L16 8L10 10L8 16L6 10L0 8L6 6Z' fill='%23b8923a'/%3E%3C/svg%3E");
|
|
42
|
+
vertical-align: top;
|
|
43
|
+
padding-top: 26pt;
|
|
44
|
+
font-family: "md2pdf Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
|
|
45
|
+
font-size: 12pt;
|
|
46
|
+
font-style: italic;
|
|
47
|
+
font-weight: 500;
|
|
48
|
+
color: #56635d;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/* No header on the first page, where the title usually is. */
|
|
52
|
+
@page :first {
|
|
53
|
+
@top-left {
|
|
54
|
+
border: 0;
|
|
55
|
+
}
|
|
56
|
+
@top-center {
|
|
57
|
+
content: "";
|
|
58
|
+
border: 0;
|
|
59
|
+
}
|
|
60
|
+
@top-right {
|
|
61
|
+
border: 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
html,
|
|
66
|
+
body {
|
|
67
|
+
margin: 0;
|
|
68
|
+
background: #fff;
|
|
69
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* Gothic: the print-only rules (page margins, running headers and page numbers). Load after
|
|
2
|
+
../gothic.css when printing; a page that only shows the document on screen leaves this out. */
|
|
3
|
+
|
|
4
|
+
@page {
|
|
5
|
+
margin: 1in 1.1in 0.9in;
|
|
6
|
+
/* An empty top box stops browsers from adding their own date/title header. */
|
|
7
|
+
@top-center {
|
|
8
|
+
content: "";
|
|
9
|
+
}
|
|
10
|
+
/* Margin boxes don't see the document's variables, so these repeat gothic.css's body font and
|
|
11
|
+
accent. */
|
|
12
|
+
@bottom-center {
|
|
13
|
+
content: "— " counter(page) " —";
|
|
14
|
+
font-family: "md2pdf IM Fell English", "Iowan Old Style", Georgia, serif;
|
|
15
|
+
font-size: 11pt;
|
|
16
|
+
color: #7a1f1f;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
@page :first {
|
|
20
|
+
@bottom-center {
|
|
21
|
+
content: "";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
html,
|
|
26
|
+
body {
|
|
27
|
+
margin: 0;
|
|
28
|
+
background: #fff;
|
|
29
|
+
}
|