Skip to content

Commit 05ee72c

Browse files
also put default syntax highlighting css second
1 parent 8f61727 commit 05ee72c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/command/render/pandoc-html.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,18 @@ export async function resolveSassBundles(
261261
}
262262

263263
// Resolve generated quarto css variables
264+
if (hasDarkStyles && defaultStyle !== "dark") {
265+
// Put dark stylesheet first if light is default (for NoJS)
266+
extras = await resolveQuartoSyntaxHighlighting(
267+
inputDir,
268+
extras,
269+
format,
270+
project,
271+
"dark",
272+
defaultStyle,
273+
);
274+
}
275+
264276
extras = await resolveQuartoSyntaxHighlighting(
265277
inputDir,
266278
extras,
@@ -270,8 +282,8 @@ export async function resolveSassBundles(
270282
defaultStyle,
271283
);
272284

273-
if (hasDarkStyles) {
274-
// Provide dark variables for this
285+
if (hasDarkStyles && defaultStyle === "dark") {
286+
// Put dark stylesheet second if dark is default (for NoJS)
275287
extras = await resolveQuartoSyntaxHighlighting(
276288
inputDir,
277289
extras,

0 commit comments

Comments
 (0)