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

Exported SVG's do not render correctly in LaTeX and Inkscape #2142

Closed
Nathan-Rozendaal opened this issue Oct 7, 2024 · 2 comments · Fixed by #2147
Closed

Exported SVG's do not render correctly in LaTeX and Inkscape #2142

Nathan-Rozendaal opened this issue Oct 7, 2024 · 2 comments · Fixed by #2147

Comments

@Nathan-Rozendaal
Copy link

The problem

Opening SVG's exported by D2 in LaTeX or Inkscape results in a black box where the diagram should be

How to reproduce

Create a simple D2 diagram:
"x->y" already does the trick

Open the svg in Inkscape

Expected result

image

Actual result

image

Tested in d2 v0.6.7

@cyborg-ts cyborg-ts added this to D2 Oct 7, 2024
@alixander
Copy link
Collaborator

Ah so this is due to contexts where CSS doesn't get executed. D2 should inline the styles in addition to using css classes

@alixander
Copy link
Collaborator

actually if we do it by default, it will override the auto light/dark switching.

Maybe we do it only if --dark-theme is not supplied by default, and just caveat that passing in theme and dark-theme together will have this behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants