From 03e4ccbc2d6f092e84cda20b06c20cef3e94e565 Mon Sep 17 00:00:00 2001 From: m-e-l-u-h-a-n Date: Fri, 12 Feb 2021 20:14:36 +0530 Subject: [PATCH] message-view: Increase spacing for lists coming after paragraphs. Lists that were followed by a paragraph (i.e. our p+ul, p+ol CSS rule) in messages had negative top margin of -3px. Adjusting the margin here is important, because the default styling would result in an excessive gap that made bulleted lists weirdly far from the previous paragraph. See #12113 for background. However, the -3px negative margin was so large that it reduced spaces between paragraph and lists, such that there was too little visible separation between the two. We fix this by going with a 0px margin-top instead. This has been tested for various structures of messages: 1. text + bulleted list 2. bulleted list + unbulleted list(or two lists) 3. only list. And it looks good in all cases. Fixes #17284. --- static/styles/rendered_markdown.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/styles/rendered_markdown.css b/static/styles/rendered_markdown.css index 91ce4eb28f..5e877c1354 100644 --- a/static/styles/rendered_markdown.css +++ b/static/styles/rendered_markdown.css @@ -37,7 +37,7 @@ /* Reduce top-margin when a paragraph is followed by an ordered or bulleted list */ p + ul, p + ol { - margin-top: -3px; + margin-top: 0; } /* Headings: We need to make sure our headings are less prominent than our sender names styling. */