Skip to content

Commit f639801

Browse files
kartbennashif
authored andcommitted
doc: make graphviz diagrams look good in dark theme
Add filter to invert colors in dark mode. Signed-off-by: Benjamin Cabé <[email protected]> (cherry picked from commit fd919b5)
1 parent 81337c6 commit f639801

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

doc/_static/css/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,10 @@ dark-mode-toggle::part(toggleLabel){
873873
font-size: unset;
874874
}
875875

876+
div.graphviz > object {
877+
filter: var(--graphviz-filter);
878+
}
879+
876880
/* Home page grid display */
877881
.grid {
878882
list-style-type: none !important;

doc/_static/css/dark.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,6 @@
9393
--btn-neutral-background-color: #404040;
9494
--btn-neutral-hover-background-color: #505050;
9595
--footer-color: #aaa;
96+
97+
--graphviz-filter: invert(0.9) brightness(1.2);
9698
}

doc/_static/css/light.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,6 @@
9191
--btn-neutral-background-color: #f3f6f6;
9292
--btn-neutral-hover-background-color: #e5ebeb;
9393
--footer-color: #808080;
94+
95+
--graphviz-filter: none;
9496
}

0 commit comments

Comments
 (0)