sindresorhus / github-markdown-css

The minimal amount of CSS to replicate the GitHub Markdown style
https://sindresorhus.com/github-markdown-css
MIT License
7.99k stars 2.1k forks source link

Missing list default decoration #103

Open ChasexCodex opened 2 years ago

ChasexCodex commented 2 years ago

The default decoration for lists (ordered and unordered) is not included.

iShawnWang commented 2 years ago

same issue here

Gaochengzhi commented 2 years ago

.mylist ul { list-style: initial; margin: initial; padding: 0 0 0 40px; } .mylist ul li { display: list-item; }

.mylist ol { list-style-type:decimal; margin: initial; padding: 0 0 0 40px; }

.mylist ol li { display: list-item; }

j-heaton commented 1 year ago

this works for me

<ReactMarkdown style={{ all: "revert" }} className="markdown-body"
                             components={{
                               ol: ({ node, ...props }) => <ol style={{ listStyle: "revert" }} {...props} />,
                               ul: ({ node, ...props }) => <ul style={{ listStyle: "revert" }} {...props} />,
                             }} >
{markdown}
</ReactMarkdown>