1
0
Fork 0

docs: fix diagram for auto dark mode

This commit is contained in:
Thomas Touhey 2024-05-06 22:56:29 +02:00
parent 9d3a59bf13
commit 4cc2904c3c
1 changed files with 2 additions and 3 deletions

View File

@ -61,13 +61,12 @@ todo_include_todos = True
mermaid_output_format = "raw"
mermaid_init_js = """
function isDarkMode() {
const theme = document.body.getAttribute("data-theme");
const color = (
getComputedStyle(document.body)
.getPropertyValue("--color-foreground-primary")
.getPropertyValue("--color-code-foreground")
);
if (theme == "dark" || color == "#ffffffcc")
if (color == "#d0d0d0")
return true;
return false;