Skip to content

Streaming Markdown in Safari sometimes results in broken list items #1262

Answered by ChristianMurphy
stippi2 asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks @stippi2!
There is no issue, with react-markdown the HTML output is correct in Safari.

The issue is with styles. Safari has different default styles, and potentially a bug in how Safari handles block layout inside lists.
Consider adding a stylesheet with

li {
  margin: 0;
  padding: 0;
}
li p {
  display: inline-block;
  margin: 0;
  padding: 0;
}

to reduce layout differences between browsers.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ChristianMurphy
Comment options

Comment options

You must be logged in to vote
3 replies
@ChristianMurphy
Comment options

Answer selected by ChristianMurphy
@stippi2
Comment options

@aimengyu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants