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

Generated SVG only supported by web browsers #992

Closed
KerstinKeller opened this issue Aug 29, 2022 · 4 comments
Closed

Generated SVG only supported by web browsers #992

KerstinKeller opened this issue Aug 29, 2022 · 4 comments
Labels
bug Something isn't working Stale

Comments

@KerstinKeller
Copy link

Describe the bug
I have used the live editor to generate an SVG file. The file loads fine in the browser.
However I cannot load it in other programs such as PowerPoint or Inkscape.

To Reproduce
Export any graph as SVG from mermaid live monitor.
E.g.

gitGraph
       commit
       commit
       branch feature
       commit
       checkout main
       merge feature

This exports as the following SVG file:

mermaid-diagram-2022-08-26-141229

Which displays fine in the browser like so:
image

However importing to a program such as Inkscape
image

Or Powerpoint
image

I already opened this issue with Inkscape, but I guess the problem might not be entirely on their side.

Expected behavior
SVGs can be downloaded that are displayed correctly by other programs interpreting SVG.

I hope this is the correct place for this issue, please let me know otherwise.

@KerstinKeller KerstinKeller added the bug Something isn't working label Aug 29, 2022
@aloisklink
Copy link
Member

Mostly blocked by mermaid-js/mermaid#2102.

However, it looks like these gitGraphs don't work because they're trying to download CSS from the internet, which isn't supported by Inkscape.

SVGs generated by mermaid-js/mermaid-cli embed the CSS in the SVG, so they don't have that problem, but they also seem to use CSS variables (see https://developer.mozilla.org/en-US/docs/Web/CSS/var), which are also not yet supported by Inkscape (see https://gitlab.com/inkscape/inbox/-/issues/1180)

@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days

@github-actions github-actions bot added the Stale label Mar 16, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2023
@wzqvip
Copy link

wzqvip commented Jan 5, 2024

This still not fixed. Both mmdc(cli) and web generated files are still with web stuff that cannot be rendered correctly in inkscape.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

3 participants