Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

markdown: Reduce space when paragraphs precede lists.

Karl Stolleyd089c42c98bd
diff --git a/web/styles/rendered_markdown.css b/web/styles/rendered_markdown.css
index ab205266e6c..821960087b3 100644
--- a/web/styles/rendered_markdown.css
+++ b/web/styles/rendered_markdown.css
@@ -13,6 +13,13 @@
.rendered_markdown {
& p {
margin: 0 0 var(--markdown-interelement-space-px);
+
+ &:has(+ ul, + ol) {
+ /* When a paragraph is immediately followed
+ by a list sibling, we reduce the paragraph's
+ ordinary bottom space by half. */
+ margin-bottom: calc(var(--markdown-interelement-space-px) / 2);
+ }
}
/* The spacing between two paragraphs is double the usual value.
@@ -82,16 +89,6 @@
}
}
- & ul,
- & ol {
- & p:has(+ ul, + ol) {
- /* When a paragraph inside a list is immediately followed
- by a list sibling, we reduce the paragraph's ordinary
- bottom space by half. */
- margin-bottom: calc(var(--markdown-interelement-space-px) / 2);
- }
- }
-
/* To avoid cutting off the focus ring on links, we set
padding on first children most likely to take links.
We account for this extra space on `.message_content`. */