Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagrams don't use theme colors #22

Open
mgeisler opened this issue Jan 5, 2023 · 2 comments · May be fixed by #28
Open

Diagrams don't use theme colors #22

mgeisler opened this issue Jan 5, 2023 · 2 comments · May be fixed by #28

Comments

@mgeisler
Copy link
Collaborator

mgeisler commented Jan 5, 2023

I got a PR from @nofurtherinformation to fix the diagram colors when a dark theme is used in mdbook: google/comprehensive-rust#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?

@hmn53
Copy link
Contributor

hmn53 commented Sep 22, 2023

Hey @mgeisler, I have verified that adding style="fill: var(--fg)" in svgbob.rs does the job. Can we go ahead with that?

@mgeisler
Copy link
Collaborator Author

Sounds great, thanks @hmn53 for digging into this!

@hmn53 hmn53 linked a pull request Sep 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants