3

Correct duplicate: Too small indent after nested list


Regarding the claimed duplicate (consecutive lists): that question was closed since it apparently follows Markdown spec in the Markdown => HTML conversion. This question is about CSS styling, not the HTML structure. Also, unlike the possible duplicate, this issue is not reproducible in other Markdown/CommonMark parsers.

It's also about a different issue: not enough space before the first unindented paragraph after nested unordered lists. The 'duplicate' is talking about issues with extra space between list items even without nesting, and only when an extra line break is added to the Markdown source (more line breaks do not affect this particular bug).


Paragraph breaks result in double line spacing everywhere except immediately after a nested bullet point. Top-level bullet points are fine, it's just the nested ones that exhibit this behaviour.

This is inconsistent. And it looks bad. It's a bit harder to tell that the line immediately after the list is supposed to be a new paragraph.

I cannot reproduce this behaviour with MarkdownPad 2 using the GitHub Flavored Markdown, Classic or CommonMark renderers with the GitHub, Markdown and None CSS options.

This behaviour also does not occur on the mobile version of SE sites, lending more credence to my theory that it's a CSS bug and not something actually intentional.

This appears to be because of an intentional ul ul { margin-bottom: 0px; } rule. Not entirely sure why that exists.

Example:


  • Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas vestibulum orci quis felis feugiat, quis sagittis ante fermentum.

    Curabitur sed nisl sagittis, fringilla neque quis, tristique mauris. Mauris fringilla elementum commodo.

    • Sed pretium vulputate vehicula. Nullam vestibulum eleifend risus, id luctus lacus fringilla id. Maecenas tortor nibh, mollis sed eros vel, maximus interdum risus.

    Maecenas rutrum nisl in venenatis sodales.

Phasellus eleifend sit amet dolor tempor porta. Phasellus tempus iaculis orci eu eleifend.


*  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas vestibulum orci quis felis feugiat, quis sagittis ante fermentum. 

    Curabitur sed nisl sagittis, fringilla neque quis, tristique mauris. Mauris fringilla elementum commodo.

    * Sed pretium vulputate vehicula. Nullam vestibulum eleifend risus, id luctus lacus fringilla id. Maecenas tortor nibh, mollis sed eros vel, maximus interdum risus.

    Maecenas rutrum nisl in venenatis sodales. 

Phasellus eleifend sit amet dolor tempor porta. Phasellus tempus iaculis orci eu eleifend.

More:

Screenshot with freehand circles

Sandbox tests

marked as duplicate by ben is uǝq backwards, Patrick Hofman, Infinite Recursion, Tim Stone, Bob Dec 2 '15 at 2:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • It seems it is by design (ie following the markdown spec, see the dupe). – DavidPostill Nov 30 '15 at 9:39
  • @DavidPostill Norepro on MarkdownPad with GFM, classic or CommonMark renderers and stylesheets. So either this is not explicitly in the spec (I think SE follows CommonMark now) or one of the implementations is wrong. I don't think it's in the spec - it appears to be a CSS/styling issue, and after a brief glance at the spec I think it only specifies document structure. – Bob Nov 30 '15 at 9:47
  • Agree it's not a duplicate, I've also seen that other one when looking for dupe. – ShaWiz Dec 1 '15 at 8:38
  • @TimStone Ok, I can agree that second one is a duplicate. – Bob Dec 2 '15 at 2:43

Browse other questions tagged .