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.

message_scroll: Restyle scroll-to-bottom button.

Sayam Samal551da562f490
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index 0d7e67c6629..f19ced1cf25 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -2119,25 +2119,30 @@ body:not(.spectator-view) {
justify-content: center;
cursor: pointer;
- &:hover #scroll-to-bottom-button {
- background: hsl(240deg 96% 68%);
- }
-
- #scroll-to-bottom-button {
- text-align: center;
+ #scroll-to-bottom-button,
+ #scroll-to-bottom-button-underlay {
width: 2.5em; /* 40px at 16px em */
height: 2.5em; /* 40px at 16px em */
- background: hsl(240deg 96% 68% / 50%);
border-radius: 50%;
- display: flex;
- align-items: center;
+ }
- & .scroll-to-bottom-icon {
- color: hsl(0deg 0% 100%);
- margin: 0 auto;
- font-size: 1.3125em; /* 21px at 16px em */
+ #scroll-to-bottom-button {
+ > .zulip-icon {
+ /* We increase the icon size for better visibility */
+ font-size: 1.5em; /* 24px at 16px em */
+ }
+
+ &:active {
+ clip-path: none;
}
}
+
+ #scroll-to-bottom-button-underlay {
+ position: absolute;
+ background-color: var(--color-background-stream-message-content);
+ opacity: 0.7;
+ z-index: -1;
+ }
}
}
diff --git a/web/templates/compose.hbs b/web/templates/compose.hbs
index deca1631451..454f5b00ffe 100644
--- a/web/templates/compose.hbs
+++ b/web/templates/compose.hbs
@@ -5,9 +5,11 @@
it changing compose box layout in any way. --}}
<div id="scroll-to-bottom-button-container" aria-hidden="true">
<div id="scroll-to-bottom-button-clickable-area" data-tooltip-template-id="scroll-to-bottom-button-tooltip-template">
- <div id="scroll-to-bottom-button">
- <i class="scroll-to-bottom-icon fa fa-chevron-down"></i>
- </div>
+ {{!-- We add a semi-transparent underlay to the scroll to bottom
+ button with the same background color as those of the stream
+ messages for better visibility against the message timestamps. --}}
+ <div id="scroll-to-bottom-button-underlay"></div>
+ {{> components/action_button id="scroll-to-bottom-button" icon="chevron-down" variant="subtle" intent="brand" }}
</div>
</div>
<div id="closed-compose-controls">