Skip to content

Commit 276591e

Browse files
disable the light highlight stylesheet in dark mode
1 parent ff8e1f8 commit 276591e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/resources/formats/html/templates/quarto-html-before-body.ejs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate');
4242
manageTransitions('#quarto-margin-sidebar .nav-link', false);
4343
if (alternate) {
44-
// note: dark is layered on light, we don't disable primary!
44+
// note: we don't disable primary, but we need to disable light highlighting
45+
const lightHighlightStylesheets = window.document.querySelectorAll('link#quarto-text-highlighting-styles:not(.quarto-color-alternate)')
46+
disableStylesheet(lightHighlightStylesheets)
4547
enableStylesheet(alternateStylesheets);
4648
for (const sheetNode of alternateStylesheets) {
4749
if (sheetNode.id === "quarto-bootstrap") {

0 commit comments

Comments
 (0)