Skip to content

Commit ae60562

Browse files
committed
Use Mermaid dark theme for dark mode
1 parent 4d9a638 commit ae60562

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: doc/footer.html

+6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
<script type="text/javascript" src="$relpath^mingcute.json.js"></script>
33
<script type="text/javascript" src="$relpath^panzoom.js"></script>
44
<script type="text/javascript">
5+
let theme = "default";
6+
// Detect browser dark mode and use dark theme for Mermaid if enabled
7+
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
8+
theme = "dark";
9+
}
510
mermaid.initialize({
11+
theme: theme,
612
startOnLoad: true,
713
graph: {
814
useMaxWidth: true

0 commit comments

Comments
 (0)