Skip to content

Commit a6d0a70

Browse files
authored
Mermaid: stick to default when not dark mode (#1965)
1 parent fbf4256 commit a6d0a70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

layouts/partials/scripts/mermaid.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939

4040
var settings = norm(mermaid.mermaidAPI.defaultConfig, params);
4141
settings.startOnLoad = true;
42-
const isDark = $('html[data-bs-theme="dark"]').length;
43-
settings.theme = isDark ? 'dark' : 'base';
42+
if ($('html[data-bs-theme="dark"]').length) {
43+
settings.theme = 'dark';
44+
}
4445
mermaid.initialize(settings);
4546

4647
// Handle light/dark mode theme changes

0 commit comments

Comments
 (0)