Skip to content

Commit 223b110

Browse files
committed
html: place theme: pandoc print block at the end, as Pandoc does
The previous commit moved the @media print block to the end of the document-css section, as the upstream issue suggested. Pandoc fixed the issue (jgm/pandoc#12064, 1d639e394) by moving it to the very end of styles.html, after the highlighting and citation CSS and outside document-css. Match that placement so the block is identical to upstream and the next Pandoc sync has no divergence to carry. Differences from the previous placement: the print resets now also apply when document-css is off, and they follow the task-list, highlighting and citation rules too.
1 parent 07ca400 commit 223b110

1 file changed

Lines changed: 21 additions & 23 deletions

File tree

‎src/resources/formats/html/pandoc/styles.html‎

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -170,29 +170,6 @@
170170
#TOC a:not(:hover) {
171171
text-decoration: none;
172172
}
173-
/* quarto-specific: print block placed after the base rules so its resets
174-
win over linkcolor, blockquote and monobackgroundcolor styles */
175-
@media print {
176-
html {
177-
color-scheme: light only;
178-
}
179-
html, body, pre, code {
180-
background-color: transparent;
181-
}
182-
body, a, a:visited, blockquote {
183-
color: black;
184-
}
185-
pre, code {
186-
padding: 0;
187-
}
188-
p, h2, h3 {
189-
orphans: 3;
190-
widows: 3;
191-
}
192-
h2, h3, h4 {
193-
page-break-after: avoid;
194-
}
195-
}
196173
$endif$
197174
span.smallcaps{font-variant: small-caps;}
198175
div.columns{display: flex; gap: 1.5em;}
@@ -221,3 +198,24 @@
221198
$if(csl-css)$
222199
$styles.citations.html()$
223200
$endif$
201+
@media print {
202+
html {
203+
color-scheme: light only;
204+
}
205+
html, body, pre, code {
206+
background-color: transparent;
207+
}
208+
body, a, a:visited, blockquote {
209+
color: black;
210+
}
211+
pre, code {
212+
padding: 0;
213+
}
214+
p, h2, h3 {
215+
orphans: 3;
216+
widows: 3;
217+
}
218+
h2, h3, h4 {
219+
page-break-after: avoid;
220+
}
221+
}

0 commit comments

Comments
 (0)