Skip to content

Commit f0dadd7

Browse files
committed
graphviz: render the generated SVGs pleasantly in dark mode
The generated SVGs now gain the `graphviz` class, which makes it easier to customize their look via CSS. This is especially important to support for dark mode, as there are other SVGs on the front page that should not receive the same treatment. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent fcc1082 commit f0dadd7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

assets/sass/dark-mode.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@
152152
#l10n-versions-dropdown footer a {
153153
color: #6969dd;
154154
}
155+
156+
svg.graphviz {
157+
filter: invert(60%);
158+
}
155159
}
156160
}
157161

layouts/_default/baseof.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ <h1 data-pagefind-meta="title">About{{ if (isset .Params "subtitle") }} - {{ .Pa
204204
},
205205
}
206206
const svg = vizInstance.renderSVGElement(x.innerText, options)
207+
svg.classList.add("graphviz")
207208
x.parentNode.insertBefore(svg, x);
208209
x.style.display = 'none'
209210
});

0 commit comments

Comments
 (0)