mdbook-svgbob
mdbook-svgbob copied to clipboard
Diagrams don't use theme colors
I got a PR from @nofurtherinformation to fix the diagram colors when a dark theme is used in mdbook: https://github.com/google/comprehensive-rust/pull/48.
The problem is that the diagrams use black as the text color — even when the background color is very dark.
The fix is simply to include a style sheet with
svg text {
fill: var(--fg);
}
I'm not sure where the right place is to add such a CSS rule since mdbook-svgbob
is a preprocessor. Perhaps it could be a style="fill: var(--fg)"
attribute instead somewhere on the generated SVG?