Skip to content

Commit a59ef79

Browse files
committed
Fix code CSS in dark mode
1 parent fc355a1 commit a59ef79

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/assets/styles/global.css‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,14 @@ body {
369369
word-break: normal;
370370
}
371371

372+
/* Higher specificity than `.dark .prose code`, which would otherwise
373+
paint per-line inline-code backgrounds inside code blocks in dark mode. */
374+
.dark .prose pre code {
375+
background: none;
376+
border: none;
377+
color: inherit;
378+
}
379+
372380
/* ── Images ──────────────────────────────────────── */
373381

374382
.prose img {

0 commit comments

Comments
 (0)