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

xyflow/react theming #15

Open
jhvst opened this issue Jul 26, 2024 · 2 comments
Open

xyflow/react theming #15

jhvst opened this issue Jul 26, 2024 · 2 comments

Comments

@jhvst
Copy link

jhvst commented Jul 26, 2024

Hi there,

First off, thanks for the public code. I found it when trying to export SVG from React Flow.

I started with a new template which fetched the new @xyflow/react path. This had the downside of the theming to break: the charts would not have boxes around them, and lines.

After some painstaking troubleshooting, I found that the new themes use CSS variables to control the styles. The iframe code does not have the parent theming class applied, but adding the following fixes that:

    iframeDocument.body.classList.add("react-flow", "light")

This code is in the iframe listener code.

Thought to save you some time should you wish to upgrade!

@3rd
Copy link
Owner

3rd commented Jul 26, 2024

Hey, thank you so much for the tip!
Started looking into the upgrade today, managed to break a few things in #16

@jhvst
Copy link
Author

jhvst commented Jul 27, 2024

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

No branches or pull requests

2 participants