Skip to content

Commit c464955

Browse files
authored
Merge pull request #70 from python-project-templates/tkp/upd
Add better sphinx mermaid defaults
2 parents 74f30fc + 0f05182 commit c464955

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

yardang/conf.py.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ nb_execution_excludepatterns = {{nb_execution_excludepatterns}}
8282

8383
#sphinxcontrib.mermaid
8484
mermaid_d3_zoom = True
85+
mermaid_fullscreen = True
8586

8687
# redirects
8788
redirects = {{redirects}}

yardang/custom.css

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,31 @@ body[data-theme="dark"] .logo-dark {
4747

4848

4949
/* Handle mermaid diagrams in dark mode */
50-
body[data-theme="light"] div.mermaid-container {
51-
background-color: unset;
50+
body[data-theme="light"] .mermaid-container {
51+
background-color: #fafafa;
5252
}
53-
body[data-theme="dark"] div.mermaid-container {
54-
background-color: whitesmoke;
53+
body[data-theme="light"] pre.mermaid svg path {
54+
stroke: black !important;
55+
}
56+
body[data-theme="dark"] .mermaid-container {
57+
background-color: #222;
58+
}
59+
body[data-theme="dark"] pre.mermaid svg path {
60+
stroke: white !important;
5561
}
5662
@media (prefers-color-scheme: dark) {
57-
div.mermaid-container {
58-
background-color: whitesmoke;
63+
.mermaid-container {
64+
background-color: #222;
65+
}
66+
pre.mermaid svg path {
67+
stroke: white !important;
5968
}
6069
}
6170
@media (prefers-color-scheme: light) {
62-
div.mermaid-container {
63-
background-color: unset;
71+
.mermaid-container {
72+
background-color: #fafafa;
73+
}
74+
body[data-theme="dark"] pre.mermaid svg path {
75+
stroke: black !important;
6476
}
6577
}

0 commit comments

Comments
 (0)