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.

info_density: Extend Markdown-aligned space to message content area.

Karl Stolley10f0d5dce3e3
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index f0371f1e108..248ecb89735 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -76,6 +76,7 @@
--base-line-height-unitless: 1.214;
--markdown-interelement-space-px: 5px;
--markdown-interelement-doubled-space-px: 10px;
+ --message-box-markdown-aligned-vertical-space: 5px;
}
/*
@@ -87,6 +88,9 @@
/* 6px appears to provide 5px of space between the avatar
and the selected-message outline, which is offset by -1px. */
--message-box-vertical-margin: 6px;
+ --message-box-markdown-aligned-vertical-space: var(
+ --markdown-interelement-space-px
+ );
--message-box-icon-width: 26px;
--message-box-icon-height: 25px;
/* The line-height on the sender line should coordinate with the
diff --git a/web/styles/message_row.css b/web/styles/message_row.css
index 8f9cffe853f..d2b462a3939 100644
--- a/web/styles/message_row.css
+++ b/web/styles/message_row.css
@@ -198,10 +198,10 @@
.message_content {
grid-area: message;
/*
- Space between two single line messages is 10px, which is maintained
- by setting 5px of padding above messages without a sender.
+ Space between two single line messages is kept in
+ lockstep with adjacent Markdown elements.
*/
- padding: 5px 0 0;
+ padding: var(--message-box-markdown-aligned-vertical-space) 0 0;
color: var(--color-text-message-default);
font-size: var(--base-font-size-px);
line-height: var(--base-line-height-unitless);
@@ -321,9 +321,10 @@
me-messages. */
line-height: var(--base-line-height-unitless);
/* Ensure the same spacing below messages as for any other
- paragraph.
- TODO: Coordinate this with other info-density variables. */
- padding-bottom: 5px;
+ paragraph. */
+ padding-bottom: var(
+ --message-box-markdown-aligned-vertical-space
+ );
/* Display message components inline, with wrapping white-space,
so the sender name and message display as a continuous line