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.

right_sidebar: Extend sidebar links hover outline left, to full width.

evykassirer7a3aa1f92083
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index c14a9ffe1a6..07b7c67b3df 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -324,6 +324,7 @@
--right-sidebar-avatar-width: 2em;
--right-sidebar-avatar-height: var(--right-sidebar-avatar-width);
--right-sidebar-avatar-right-margin: 11px;
+ --right-sidebar-presence-circle-width: 1.4285em; /* 20px at 14px em */
/* Tippy popover related values */
--navbar-popover-menu-min-width: 230px;
diff --git a/web/styles/right_sidebar.css b/web/styles/right_sidebar.css
index d238979f47f..6573348adca 100644
--- a/web/styles/right_sidebar.css
+++ b/web/styles/right_sidebar.css
@@ -311,7 +311,10 @@
"starting-anchor-element row-content markers-and-controls" var(
--line-height-sidebar-row
)
- ". row-content ." auto / 20px minmax(0, 1fr)
+ ". row-content ." auto / var(
+ --right-sidebar-presence-circle-width
+ )
+ minmax(0, 1fr)
minmax(0, auto);
align-items: baseline;
}
@@ -539,7 +542,6 @@
.buddy-list-user-link,
.invite-user-shortcut {
margin-right: var(--width-simplebar-scroll-hover);
- padding-left: var(--right-sidebar-left-spacing);
border-radius: 4px;
&:hover {
@@ -572,8 +574,8 @@
}
}
-.buddy-list-user-link {
- margin-left: var(--right-sidebar-toggle-width-offset);
+.buddy-list-user-link .right-sidebar-wrappable-text-container {
+ margin-left: var(--right-sidebar-header-icon-toggle-width);
}
.invite-user-shortcut {
@@ -583,18 +585,40 @@
from the legacy value. */
margin-top: calc(25px - (var(--legacy-body-line-height-unitless) * 1em));
margin-bottom: var(--sidebar-bottom-spacing);
- padding-left: 0;
.invite-user-link {
- grid-template-columns:
- var(--right-sidebar-header-icon-toggle-width)
+ grid-template:
+ "left-spacing icon text" /
+ calc(var(--right-sidebar-toggle-width-offset) - 2px)
+ var(--right-sidebar-presence-circle-width)
minmax(0, 1fr);
.zulip-icon-user-plus {
+ grid-area: icon;
justify-self: center;
/* Smaller icon size to align the link text with the other buddy list links */
font-size: 13px;
}
+
+ .right-sidebar-wrappable-text-inner {
+ grid-area: text;
+ }
+ }
+}
+
+#user-list.with_avatars .invite-user-link {
+ /* Subtract 2px to account for the border on this element */
+ grid-template:
+ "icon middle-spacing text" /
+ var(--right-sidebar-header-icon-toggle-width)
+ calc(
+ var(--right-sidebar-text-indent-with-avatar) - 2px -
+ var(--right-sidebar-header-icon-toggle-width)
+ )
+ minmax(0, 1fr);
+
+ .zulip-icon-user-plus {
+ margin-left: calc(var(--right-sidebar-header-icon-toggle-width) / 2);
}
}