diff --git a/src/js/mermaid.js b/src/js/mermaid.js index a5f4f5c..b480c48 100644 --- a/src/js/mermaid.js +++ b/src/js/mermaid.js @@ -5,22 +5,21 @@ document.addEventListener("DOMContentLoaded", function (event) { let lstore = Storage.namespace(THEME) let currentMode = lstore.get("color-mode") let darkModeQuery = window.matchMedia("(prefers-color-scheme: dark)") - let primaryColor = "#ececff" let darkMode = false + let theme = "default" if (currentMode === DARK_MODE || (currentMode === AUTO_MODE && darkModeQuery.matches)) { - primaryColor = "#6C617E" darkMode = true + theme = "dark" } import("mermaid") .then(({ default: md }) => { md.initialize({ flowchart: { useMaxWidth: true }, - theme: "base", + theme: theme, themeVariables: { - darkMode: darkMode, - primaryColor: primaryColor + darkMode: darkMode } }) }) diff --git a/src/sass/_base.scss b/src/sass/_base.scss index 14bddcb..8199400 100644 --- a/src/sass/_base.scss +++ b/src/sass/_base.scss @@ -1,6 +1,6 @@ :root, :root[color-mode="light"] { - --code-max-height: auto; + --code-max-height: none; @include light_mode; }