Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions theme/diagrams.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ html:is(.coal, .navy, .ayu) .mermaid-light {
display: none;
}

/* Without JavaScript, mdBook darkens the page by prefers-color-scheme alone. */
@media (prefers-color-scheme: dark) {
html:not(.js) .mermaid-dark {
display: block;
}

html:not(.js) .mermaid-light {
display: none;
}
}

/* A .dot is expected to pick colours that hold up on either page background,
so nothing here touches them. Only graphviz's own defaults are lifted: plain
black disappears against a dark page, and a diagram that says nothing about
Expand Down
Loading