Skip to content

Commit dd67d98

Browse files
committed
html: port Pandoc 3.13 styles.html print, link and border updates
Bring the wired styles.html (used only with theme: pandoc) in line with the parity parts of Pandoc 3.13's stock styles: the print block drops backgrounds and the hardcoded 12pt font size, links inherit the text color unless linkcolor is set, and hr/tbody/th borders use currentColor. Rendered output is unchanged on screen when no color variables are set. Pandoc's light-dark()/color-scheme support is not ported. Its color-scheme expression emits "light dark" when no variables are set, which would make OS-preference dark mode the default for every theme: pandoc document, while the Quarto CSS loaded on that path (syntax highlighting, quarto-html) is light-only. The quotecolor and quotebordercolor variables come with that feature and stay out with it.
1 parent 5b5c879 commit dd67d98

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

‎news/changelog-1.12.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All changes included in 1.12:
99
- Update `verapdf` to 1.30.3 (used by `quarto install verapdf` for PDF/A validation).
1010
- Update `pandoc` to 3.13
1111
- ([jgm/pandoc#11540](https://github.com/jgm/pandoc/issues/11540)): Horizontal rules (`---`) in Typst output are now full-width, following Pandoc 3.13's use of Typst 0.15's native `divider` element, instead of the previous centered half-width line. Restyle them with `#show divider: set line(stroke: 2pt)` in a raw Typst block or a custom template.
12+
- ([jgm/pandoc#11831](https://github.com/jgm/pandoc/pull/11831)): HTML documents using `theme: pandoc` pick up Pandoc 3.13's style updates. Links now inherit the surrounding text color unless `linkcolor` is set, horizontal rules and table borders follow the text color, and printed output drops backgrounds and the fixed 12pt font size, rendering at the 11pt print size used by other Quarto HTML themes. Pandoc 3.13's automatic dark mode is not enabled for `theme: pandoc`.
1213

1314
## Accessibility
1415

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

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@
3838
}
3939
@media print {
4040
html {
41-
background-color: $if(backgroundcolor)$$backgroundcolor$$else$white$endif$;
41+
color-scheme: light only;
4242
}
43-
body {
43+
html, body, pre, code {
4444
background-color: transparent;
45+
}
46+
body, a, a:visited, blockquote {
4547
color: black;
46-
font-size: 12pt;
48+
}
49+
pre, code {
50+
padding: 0;
4751
}
4852
p, h2, h3 {
4953
orphans: 3;
@@ -56,11 +60,8 @@
5660
p {
5761
margin: 1em 0;
5862
}
59-
a {
60-
color: $if(linkcolor)$$linkcolor$$else$#1a1a1a$endif$;
61-
}
62-
a:visited {
63-
color: $if(linkcolor)$$linkcolor$$else$#1a1a1a$endif$;
63+
a, a:visited {
64+
color: $if(linkcolor)$$linkcolor$$else$inherit$endif$;
6465
}
6566
img {
6667
max-width: 100%;
@@ -147,7 +148,7 @@
147148
}
148149
hr {
149150
border: none;
150-
border-top: 1px solid #1a1a1a;
151+
border-top: 1px solid currentColor;
151152
height: 1px;
152153
margin: 1em 0;
153154
}
@@ -164,11 +165,11 @@
164165
}
165166
tbody {
166167
margin-top: 0.5em;
167-
border-top: 1px solid $if(fontcolor)$$fontcolor$$else$#1a1a1a$endif$;
168-
border-bottom: 1px solid $if(fontcolor)$$fontcolor$$else$#1a1a1a$endif$;
168+
border-top: 1px solid currentColor;
169+
border-bottom: 1px solid currentColor;
169170
}
170171
th {
171-
border-top: 1px solid $if(fontcolor)$$fontcolor$$else$#1a1a1a$endif$;
172+
border-top: 1px solid currentColor;
172173
padding: 0.25em 0.5em 0.25em 0.5em;
173174
}
174175
td {

0 commit comments

Comments
 (0)