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.

user_circles: Set user circles to scale with text.

Karl Stolley818094f81d45
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index 2cf40a19084..c9b052025f7 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -209,6 +209,13 @@
--outer-spacing-input-pill-container: var(--vertical-spacing-input-pill);
--horizontal-spacing-input-pill: 6px;
+ /* User circles. */
+ /* 8px at 14px/1em */
+ --length-user-status-circle: 0.5714em;
+ /* Shrink the user activity circle for the Recent Conversations context. */
+ /* 7px at 14px/1em */
+ --length-user-status-circle-recent-conversations: 0.5em;
+
/* Overlay heights for streams modal */
--overlay-container-height: 95vh;
--overlay-container-max-height: 1000px;
diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css
index 67876c2ab84..b8f5e9969e6 100644
--- a/web/styles/left_sidebar.css
+++ b/web/styles/left_sidebar.css
@@ -1066,8 +1066,8 @@ li.topic-list-item {
}
.user_circle {
- width: 8px;
- height: 8px;
+ width: var(--length-user-status-circle);
+ height: var(--length-user-status-circle);
}
.zulip-icon.zulip-icon-bot {
diff --git a/web/styles/popovers.css b/web/styles/popovers.css
index e5efaf9c8a2..7c101f33a32 100644
--- a/web/styles/popovers.css
+++ b/web/styles/popovers.css
@@ -412,8 +412,8 @@ ul {
.user_profile_presence,
.popover_user_presence {
- width: 8px;
- height: 8px;
+ width: var(--length-user-status-circle);
+ height: var(--length-user-status-circle);
margin: 0 5px;
display: inline-block;
float: initial;
@@ -422,6 +422,15 @@ ul {
flex-shrink: 0;
}
+.user_profile_presence {
+ /* Remove font-size to allow this to scale
+ with the menu header text. Declaring font-size
+ here maintains the legacy design of keeping
+ the user-circle smaller, despite the larger
+ surrounding text and icons. */
+ font-size: var(--base-font-size-px);
+}
+
.bot-owner-name {
text-decoration: underline;
@@ -1106,8 +1115,8 @@ ul {
.status-circle {
position: absolute;
- width: 8px;
- height: 8px;
+ width: var(--length-user-status-circle);
+ height: var(--length-user-status-circle);
top: unset;
left: unset;
right: -1px;
diff --git a/web/styles/recent_view.css b/web/styles/recent_view.css
index b97069529f5..211b31cb3dc 100644
--- a/web/styles/recent_view.css
+++ b/web/styles/recent_view.css
@@ -482,9 +482,10 @@
}
.user_circle {
- /* Shrink the user activity circle for the Recent Conversations context. */
- min-width: 7px;
- height: 7px;
+ min-width: var(
+ --length-user-status-circle-recent-conversations
+ );
+ height: var(--length-user-status-circle-recent-conversations);
float: left;
position: unset;
}
diff --git a/web/styles/right_sidebar.css b/web/styles/right_sidebar.css
index aafa0f85bb9..81944ffd39d 100644
--- a/web/styles/right_sidebar.css
+++ b/web/styles/right_sidebar.css
@@ -117,8 +117,8 @@ $user_status_emoji_width: 24px;
}
.user_circle {
- width: 8px;
- height: 8px;
+ width: var(--length-user-status-circle);
+ height: var(--length-user-status-circle);
grid-area: starting-anchor-element;
place-self: center center;
}
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index d0fe3860853..2e8fbd2312b 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -828,8 +828,8 @@ strong {
Most of the style rules related to color, gradient etc. which are generally common throughout
the app are defined in user_circles.css and are not overridden here. */
.user_circle {
- width: 8px;
- height: 8px;
+ width: var(--length-user-status-circle);
+ height: var(--length-user-status-circle);
margin: 0 5px 0 -6px;
position: relative;
float: left;