Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_row: Move message_controls into proper place in row file.
Karl Stolleyaa83b1b5cd7c
diff --git a/web/styles/message_row.css b/web/styles/message_row.cssindex b56473d601c..9a642ca4a70 100644--- a/web/styles/message_row.css+++ b/web/styles/message_row.css@@ -412,6 +412,133 @@}}+.message_controls {+ display: flex;+ align-items: baseline;+ font-size: 16px;+ /* This is a bit tricky; we need to reserve space for the message+ controls even when the message isn't hovered, so that hover+ doesn't disturb the layout. Usually that would be just+ visibility: hidden, but that cannot be animated, so we set+ opacity as well, which can be animated. */+ .message_control_button {+ opacity: 0;+ visibility: hidden;+ transition: all 0.2s ease;+ width: var(--message-box-icon-width);+ height: var(--message-box-icon-height);+ text-align: center;+ color: var(--color-message-action-visible);++ & i {+ vertical-align: middle;+ /* TODO: Math for these values, possibly with variables.+ In short, the icon body is 16px square; the current+ area for the icon is 26px wide by 25px tall, so these+ values ensure a 26px x 25px clickable area for the icon. */+ padding: 2.5px 3px;++ &::before {+ /* We specify block display so the+ scaling transform below works as+ expected. */+ display: block;+ }++ &:active::before {+ transform: scale(0.92);+ transform-origin: center;+ outline: 0;+ }++ &:focus {+ /* Remove the outline but do not color on focus;+ focus-visible is more appropriate for the color+ changes, as it only applies color when focus+ is achieved from a keyboard or other pointerless+ device. */+ outline: 0;+ }++ &:hover,+ &:focus-visible {+ outline: 0;+ color: var(--color-message-action-interactive);+ }++ /* Separate hover colors for stars */+ &.star:hover,+ &.star:focus-visible {+ color: var(--color-message-star-action);+ }+ }++ .zulip-icon-more-vertical {+ /* Increase visual prominence of the vdots. */+ font-size: 21px;+ }+ }++ /* Tooltips should not follow the width restrictions of their parent element. */+ [data-tippy-root] {+ width: max-content;+ word-wrap: unset;+ }++ .edit_content {+ /* Icons for editing content are determined on message hover;+ we set an empty `.edit_content` to have 0 height in order to+ preserve the layout of the other icons prior to any hovering. */+ &:empty {+ height: 0;+ }++ &:hover {+ cursor: pointer;+ }+ }++ .message_failed {+ display: inline-flex;+ justify-content: space-between;+ cursor: pointer;+ position: relative;+ vertical-align: middle;+ padding-left: 2px;++ &.hide {+ display: none;+ }++ .rotating {+ display: inline-block;+ outline: none;++ animation: rotate 1s infinite linear;+ }++ .failed_message_action {+ opacity: 1 !important;+ color: var(--color-failed-message-send-icon);+ font-weight: bold;+ padding: 1px;+ }++ .message_control_button {+ visibility: inherit;+ }+ }++ .star_container {+ &:not(.empty-star) {+ /* Color, opacity, and visibility, as though the message is hovered. */+ color: var(--color-message-star-action);+ opacity: 1;+ visibility: visible !important;+ }+ }+}+.unread_marker {margin-left: var(--unread-marker-left);opacity: 0;diff --git a/web/styles/zulip.css b/web/styles/zulip.cssindex 9f7bd4e2306..3c41358d1f4 100644--- a/web/styles/zulip.css+++ b/web/styles/zulip.css@@ -830,133 +830,6 @@ strong {animation: rotate 1s infinite linear;}-.message_controls {- display: flex;- align-items: baseline;- font-size: 16px;- /* This is a bit tricky; we need to reserve space for the message- controls even when the message isn't hovered, so that hover- doesn't disturb the layout. Usually that would be just- visibility: hidden, but that cannot be animated, so we set- opacity as well, which can be animated. */- .message_control_button {- opacity: 0;- visibility: hidden;- transition: all 0.2s ease;- width: var(--message-box-icon-width);- height: var(--message-box-icon-height);- text-align: center;- color: var(--color-message-action-visible);-- & i {- vertical-align: middle;- /* TODO: Math for these values, possibly with variables.- In short, the icon body is 16px square; the current- area for the icon is 26px wide by 25px tall, so these- values ensure a 26px x 25px clickable area for the icon. */- padding: 2.5px 3px;-- &::before {- /* We specify block display so the- scaling transform below works as- expected. */- display: block;- }-- &:active::before {- transform: scale(0.92);- transform-origin: center;- outline: 0;- }-- &:focus {- /* Remove the outline but do not color on focus;- focus-visible is more appropriate for the color- changes, as it only applies color when focus- is achieved from a keyboard or other pointerless- device. */- outline: 0;- }-- &:hover,- &:focus-visible {- outline: 0;- color: var(--color-message-action-interactive);- }-- /* Separate hover colors for stars */- &.star:hover,- &.star:focus-visible {- color: var(--color-message-star-action);- }- }-- .zulip-icon-more-vertical {- /* Increase visual prominence of the vdots. */- font-size: 21px;- }- }-- /* Tooltips should not follow the width restrictions of their parent element. */- [data-tippy-root] {- width: max-content;- word-wrap: unset;- }-- .edit_content {- /* Icons for editing content are determined on message hover;- we set an empty `.edit_content` to have 0 height in order to- preserve the layout of the other icons prior to any hovering. */- &:empty {- height: 0;- }-- &:hover {- cursor: pointer;- }- }-- .message_failed {- display: inline-flex;- justify-content: space-between;- cursor: pointer;- position: relative;- vertical-align: middle;- padding-left: 2px;-- &.hide {- display: none;- }-- .rotating {- display: inline-block;- outline: none;-- animation: rotate 1s infinite linear;- }-- .failed_message_action {- opacity: 1 !important;- color: var(--color-failed-message-send-icon);- font-weight: bold;- padding: 1px;- }-- .message_control_button {- visibility: inherit;- }- }-- .star_container {- &:not(.empty-star) {- /* Color, opacity, and visibility, as though the message is hovered. */- color: var(--color-message-star-action);- opacity: 1;- visibility: visible !important;- }- }-}-.star {&:hover {cursor: pointer;