Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_box: Base sender line-height on single-line message.
Karl Stolley8697c0c63ebd
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.cssindex 41067e56f1b..052f75010e6 100644--- a/web/styles/app_variables.css+++ b/web/styles/app_variables.css@@ -162,10 +162,18 @@);--message-box-icon-width: 26px;--message-box-icon-height: 25px;+ --message-box-height-senderless-single-line-message: calc(+ var(--base-line-height-unitless) * var(--base-font-size-px) ++ calc(var(--markdown-interelement-space-px) * 2)+ );/* The line-height on the sender line should coordinate with the- height of the hover icons. The sender line never wraps, so this- just keeps the two in line with the grid definition. */- --message-box-sender-line-height: var(--message-box-icon-height);+ height of a single-line, senderless message, but never be smaller+ than the height of the hover icons. The sender line never wraps,+ so this just keeps everything in line with the grid definition. */+ --message-box-sender-line-height: max(+ var(--message-box-icon-height),+ var(--message-box-height-senderless-single-line-message)+ );/* This width is updated with an exact pixelwidth upon UI initialization. */--message-box-timestamp-column-width: 0;diff --git a/web/styles/message_row.css b/web/styles/message_row.cssindex a5eb9d058b7..b74c2ea309b 100644--- a/web/styles/message_row.css+++ b/web/styles/message_row.css@@ -104,7 +104,7 @@ensures the timestamp will always have enough spacein the column. */grid-template:- var(--message-box-icon-height) repeat(3, auto) /+ var(--message-box-sender-line-height) repeat(3, auto) /var(--message-box-avatar-column-width) minmax(0, 1fr) calc(3 * var(--message-box-icon-width))@@ -336,8 +336,13 @@}.message_content {- /* Top padding is reduced when there is a sender line. */- padding-top: 3px;+ /* Pull message content up closer to sender to+ let the text baseline sit adjacent the bottom+ of the avatar. */+ margin-top: calc(+ var(--message-box-markdown-aligned-vertical-space) * 0.5 * -1+ );+ padding-top: 0;grid-area: message;}