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

How does the styling work? #100

Closed
jikkujose opened this issue Nov 16, 2017 · 8 comments
Closed

How does the styling work? #100

jikkujose opened this issue Nov 16, 2017 · 8 comments

Comments

@jikkujose
Copy link

There seems to be no mention about it? The demo code seems to be too cryptic!

@rexxars
Copy link
Collaborator

rexxars commented Nov 18, 2017

There isn't any styling by default. react-markdown just renders semantic markup, then it's up to the developer to apply styles to those. I'll flag this for clarity in v3's readme.

@rexxars rexxars added this to the 3.0.0 milestone Nov 18, 2017
@jikkujose

This comment has been minimized.

@rexxars rexxars removed this from the 3.0.0 milestone Nov 21, 2017
@rexxars

This comment has been minimized.

@rexxars rexxars closed this as completed Nov 21, 2017
@stahlmanDesign
Copy link

I installed this module with npm https://github.com/sindresorhus/github-markdown-css
and I import it like this
import 'github-markdown-css' <-- it finds the css in node_modules

Then wrap your markdown with the className 'markdown-body' used by the css

<div className='markdown-body'>
  <ReactMarkdown source='# hello'/>
</div>

This styles the th td table etc like github markdown

@lambduli

This comment has been minimized.

@OlivierJM

This comment has been minimized.

@tnrich
Copy link

tnrich commented Nov 2, 2020

@rexxars
If you could link to this issue and the fix @stahlmanDesign mentioned above in the README that would be awesome!

@wooorm
Copy link
Member

wooorm commented Nov 3, 2020

@tnrich The web is made up of JS, HTML, and CSS. We use JS to turn Markdown into HTML. Similar to how React doesn’t style your website like GitHub, we don’t either. There is nothing in this project tied to GitHub, which is what github-markdown-css does. So, blessing it by putting it in the readme makes no sense to me. Instead, have fun, be creative, and make your content fancy with your own CSS!

@remarkjs remarkjs locked as resolved and limited conversation to collaborators Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

7 participants