Skip to content

Commit cfce59a

Browse files
authored
Merge pull request #68 from python-project-templates/tkp/mer
Default background color in mermaid diagrams in dark mode
2 parents dba2bb9 + 0f73a58 commit cfce59a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

yardang/custom.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,22 @@ body[data-theme="dark"] .logo-dark {
4444
display: none;
4545
}
4646
}
47+
48+
49+
/* Handle mermaid diagrams in dark mode */
50+
body[data-theme="light"] div.mermaid-container {
51+
background-color: unset;
52+
}
53+
body[data-theme="dark"] div.mermaid-container {
54+
background-color: whitesmoke;
55+
}
56+
@media (prefers-color-scheme: dark) {
57+
div.mermaid-container {
58+
background-color: whitesmoke;
59+
}
60+
}
61+
@media (prefers-color-scheme: light) {
62+
div.mermaid-container {
63+
background-color: unset;
64+
}
65+
}

0 commit comments

Comments
 (0)