Markdown Editor Styling Overwritten by @shadcn/ui Typography in React App #4051
Unanswered
softshipper
asked this question in
Q&A
Replies: 1 comment
-
Same here :") |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I’m working on a React application that uses @shadcn/ui for the UI framework and react-markdown for rendering Markdown content. My problem is that the Markdown content is not displaying correctly because the typography styles from @shadcn/ui are overriding the Markdown styles. Specifically, the Markdown headers and other text elements are not showing the expected formatting.
Here is the relevant part of my React component:
To solve this issue, I created a custom CSS class to override the global typography styles from @shadcn/ui. Here is the CSS:
By wrapping the Markdown component in a div with the markdown-content class, I ensured the Markdown styles were correctly applied:
Unfortunately, the header still doesn't show the correct format in the Markdown component.

Best regards
Beta Was this translation helpful? Give feedback.
All reactions