Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
reactions: Let emoji and count act as simple flex items.
Karl Stolley65466cec4407
diff --git a/web/styles/message_row.css b/web/styles/message_row.cssindex 11add9d5777..3c6fcfbe3bf 100644--- a/web/styles/message_row.css+++ b/web/styles/message_row.css@@ -247,10 +247,15 @@ $time_column_min_width: 50px; /* + padding */.message_reactions {grid-area: reactions;- margin-top: -1px;display: flex;/* Allow reactions to wrap in mobile viewports */flex-wrap: wrap;+ /* Keep reactions aligned to start (top), so that the+ margin on the reaction button doesn't appear to+ stretch the reactions taller. */+ align-items: flex-start;+ /* Control reaction spacing with a gap */+ gap: 4px;}.message_edit {diff --git a/web/styles/reactions.css b/web/styles/reactions.cssindex acd1093187d..fa5ecf13739 100644--- a/web/styles/reactions.css+++ b/web/styles/reactions.css@@ -5,7 +5,6 @@.message_reaction {display: flex;- margin: 0.15em;padding: 0 2px 0 0;cursor: pointer;background-color: hsl(0deg 0% 100%);@@ -24,37 +23,34 @@+ .reaction_button {visibility: hidden;pointer-events: none;- /* Match margins to .message_reaction;- probably need to put this in a variable,- if it's kept. */- margin: 0.15em;padding: 3px;height: 13px;border-radius: 4px;padding-left: 0.3em;border: 1px solid hsl(0deg 0% 73%);padding-right: 0.3em;+ /* TODO: Eventually this space will be set on the message+ box, but for now this preserves the space beneath the+ reactions area. */+ margin-bottom: 2px;}.emoji {- display: inline-block;- flex-shrink: 0;- vertical-align: top;- top: 0;margin: 1px 3px;height: 17px;width: 17px;- position: relative;+ /* Preserve the emoji's dimensions, no+ matter what the flexbox does. */+ flex-shrink: 0;+ /* Don't inherit position: relative; from+ the base .emoji class. */+ position: static;}}.message_reaction_count {- position: relative;- top: 1px;font-size: 90%;- display: flex;- margin: 0 3px;- padding: 2px 0;+ margin: 2px 3px;line-height: 1em;}