Skip to content

Commit fe5c6b8

Browse files
authored
fix: full screen dark mode and color flickering (#47)
* Added support for full screen dark mode and no color flickering * Remove dar mode JS file and reference to it in plugin.
1 parent 3c7b998 commit fe5c6b8

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

mkdocs_drawio/css/drawio-darkmode.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@
1313
[data-bs-theme="dark"] {
1414
color-scheme: dark;
1515
}
16+
17+
/* Override drawio's color-scheme
18+
to just inherit from what was set
19+
for the page in the code above */
20+
.mxgraph,
21+
.geDiagramContainer {
22+
color-scheme: inherit !important;
23+
}

mkdocs_drawio/js/drawio-darkmode.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

mkdocs_drawio/plugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ def on_config(self, config: base.Config):
151151

152152
if self.config.darkmode:
153153
self.css.append("css/drawio-darkmode.css")
154-
self.js.append("js/drawio-darkmode.js")
155154

156155
for path in self.css:
157156
config.extra_css.append(str(path))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "mkdocs-drawio"
3-
version = "1.12.1"
3+
version = "1.12.2"
44
description = "MkDocs plugin for embedding Drawio files"
55
authors = [
66
"Jan Larwig <jan@larwig.com>",

0 commit comments

Comments
 (0)