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

Code block background color changed after upgrading to v3.9.9 #354

Closed
Udayendu opened this issue Mar 1, 2022 · 8 comments
Closed

Code block background color changed after upgrading to v3.9.9 #354

Udayendu opened this issue Mar 1, 2022 · 8 comments

Comments

@Udayendu
Copy link

Udayendu commented Mar 1, 2022

  • Yesterday to get some fix on the list, I upgraded the react-md-editor version to v3.9.9 which fixed the list issue but now background color for the code block got changed.

Before upgrade

image

After upgrade

image

@jaywcjlove
Copy link
Member

I confirm this upgrade is correct.

The code block color is the color that plagiarized GitHub displays code blocks.

You can conflict styles to customize.

@Udayendu

@Udayendu
Copy link
Author

Udayendu commented Mar 1, 2022

I confirm this upgrade is correct.

The code block color is the color that plagiarized GitHub displays code blocks.

You can conflict styles to customize.

@Udayendu

Thanks for the update. But this is really strange.
There has not been any change from the code. Just upgraded this particular package and the code block BG is not how it supposed to be.

I just rolled back the code which was having the older version and the code block bg color is looking as expected.

So how to identify what has changed ?

@jaywcjlove
Copy link
Member

@Udayendu
Copy link
Author

Udayendu commented Mar 1, 2022

Here is the difference that I can see in the browser:

On react-md-editor@^3.9.9 and react-markdown-preview@~3.5.0

image

On react-md-editor@^3.8.2 and react-markdown-preview@3.4.1

image

And if I will just remove the following, then everything is working fine:

image

@Udayendu
Copy link
Author

Udayendu commented Mar 2, 2022

@jaywcjlove
Here is the difference that I can see in the browser:

On react-md-editor@^3.9.9 and react-markdown-preview@~3.5.0

image

On react-md-editor@^3.8.2 and react-markdown-preview@3.4.1

image

And if I will just remove the following, then everything is working fine:

image

Seems like here is the changes that's breaking the code block color:

Old Working code: https://github.com/uiwjs/react-markdown-preview/blob/v3.4.1/src/styles/markdown.less#L24
New not working code: https://github.com/uiwjs/react-markdown-preview/blob/master/src/styles/markdown.less#L79

Let me know how this can be fixed.

@jaywcjlove
Copy link
Member

jaywcjlove commented Mar 2, 2022

@Udayendu
Copy link
Author

Udayendu commented Mar 2, 2022

https://github.com/uiwjs/react-markdown-preview/blob/a7dae700b53b741d58f7333584a45044add12e36/src/styles/markdown.less#L73-L81

yes i fixed it, it needs background color. @Udayendu

OK. If that's the case then let me see how can I overwrite that in my scss file.

@Udayendu
Copy link
Author

Udayendu commented Mar 2, 2022

I was able to fix the code block color in my code itself. So closing this now.

@Udayendu Udayendu closed this as completed Mar 2, 2022
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