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: Improve alignment, spacing around horizontal rules.

Karl Stolleyac002b358c3b
diff --git a/web/styles/rendered_markdown.css b/web/styles/rendered_markdown.css
index a497e06b481..507c8660403 100644
--- a/web/styles/rendered_markdown.css
+++ b/web/styles/rendered_markdown.css
@@ -35,6 +35,13 @@
border-top: 1px solid hsl(0deg 0% 87%);
/* Override Bootstrap with doubled interelement space */
margin: calc(var(--markdown-interelement-space-px) * 2) 0;
+
+ &:first-child {
+ /* When a horizontal rule opens a message, or any other
+ area in the message area (e.g., spoilers), there
+ should be no space above the rule. */
+ margin-top: 0;
+ }
}
/* Headings */
@@ -407,7 +414,9 @@
`.rendered_markdown` out of the baseline group
formed with EDITED/MOVED markers and the
timestamp when the first child of the rendered
- markdown is a media element or KaTeX. */
+ markdown is a horizontal rule, a media element,
+ or KaTeX. */
+ &:has(> hr:first-child),
&:has(> .message_inline_image:first-child),
&:has(> p:first-child > .katex-display) {
align-self: center;