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

renderer: no css svg #1714

Open
alixander opened this issue Nov 8, 2023 · 1 comment
Open

renderer: no css svg #1714

alixander opened this issue Nov 8, 2023 · 1 comment

Comments

@alixander
Copy link
Collaborator

D2 output SVGs can't be imported into SVG renderers like Figma and Inkscape currently because we style with CSS.

Might be doable to map all the CSS fields to SVG attributes.

@cyborg-ts cyborg-ts added this to D2 Nov 8, 2023
@uliw
Copy link

uliw commented Nov 27, 2023

it is possible that this not related to CSS. If you look at a d2 svg file in inkscape, it is evident that there are many svg elements that are not related to the actual graph. Using the simple x->y example one gets the following

image

it is unclear why rect1 is needed, and if is needed, why is it in front of all other objects?

The other problem is that the coordinate system seems wrong. Resizing the page to the graph dimensions results in this

image

I don't speak svg, but hope this helps

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

No branches or pull requests

2 participants