message_view: Better tolerate different opening Markdown elements.

This commit is contained in:
Karl Stolley
2025-03-13 15:37:53 -05:00
committed by Tim Abbott
parent 219a3c9b09
commit 4454811191
2 changed files with 5 additions and 12 deletions

View File

@@ -150,11 +150,6 @@
.message_content {
grid-area: message;
/*
Space between two single line messages is kept in
lockstep with adjacent Markdown elements.
*/
padding: var(--message-box-markdown-aligned-vertical-space) 0 0;
color: var(--color-text-message-default);
/* We explicitly set line-height here so that
the message area is not beholden to the legacy
@@ -375,6 +370,7 @@
}
.message_content {
padding: var(--message-box-markdown-aligned-vertical-space) 0 0;
/* Pull message content up closer to sender to
let the text baseline sit adjacent the bottom
of the avatar. We also need to account for the

View File

@@ -50,13 +50,6 @@
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 */
@@ -444,6 +437,10 @@
transition: background 0.3s ease;
background: hsl(0deg 0% 0% / 3%);
&:first-child {
margin-top: var(--markdown-interelement-space-px);
}
&:hover {
background: hsl(0deg 0% 0% / 15%);
}