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

Can inline styles be supported? #158

Open
liuyib opened this issue Jun 2, 2022 · 1 comment
Open

Can inline styles be supported? #158

liuyib opened this issue Jun 2, 2022 · 1 comment

Comments

@liuyib
Copy link

liuyib commented Jun 2, 2022

Firstly, react-diff-viewer inserts the <style> tag to render CSS styles, but in some cases (such as Micro-Frontends, I'm using qiankun framework), the code styles will be lost:

image

So I think above problem can be solved by inline CSS styles, or put the styles to .css file. This is a valid guess, for example, react-codemirror2 with similar functions is put CSS styles to .css files, and its style is normal.

image

Totally, I hope react-diff-viewer can support multiple way to render CSS styles, instead of only <style> tag.

@VladyslavKvaskov
Copy link

I have encountered the same problem.
I have a little solution in my issue

#181

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