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.

recent_view: Use variables in the header/row offset calculation.

Aman Agrawal487d7745b391
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index 68cd128174d..7355aa49ff3 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -1235,6 +1235,8 @@
/* Recent view */
--recent-view-body-border-width: 1px;
+ --recent-view-header-border-width: 1px;
+ --recent-view-row-left-padding: 0.75em; /* 12px at 16px / 1em */
--recent-view-max-avatars: 4;
--recent-view-participant-item-width: 1.5em; /* 24px at 16px / 1em */
--recent-view-participant-item-padding-x: 0.0938em; /* 1.5px at 16px / 1em */
diff --git a/web/styles/recent_view.css b/web/styles/recent_view.css
index 10b7c122541..92e29e2332e 100644
--- a/web/styles/recent_view.css
+++ b/web/styles/recent_view.css
@@ -193,7 +193,8 @@
.table_fix_head {
padding: 0 !important;
- border: 1px solid var(--color-border-recent-view-table);
+ border: var(--recent-view-header-border-width) solid
+ var(--color-border-recent-view-table);
border-radius: 5px 5px 0 0;
overflow: hidden;
}
@@ -515,7 +516,7 @@
/* Extra left padding to make room for the unread marker bar
alongside the keyboard selection outline, applied to all
rows so content aligns between read and unread rows. */
- padding-left: 0.75em; /* 12px at 16px/1em */
+ padding-left: var(--recent-view-row-left-padding);
}
.unread_topic {
@@ -653,9 +654,10 @@
cursor: default;
.recent-view-header-wrapper {
- /* 0.75em left padding, 1px header width */
--recent-view-channel-row-header-minus-body: calc(
- 0.75em + var(--recent-view-body-border-width) - 1px
+ var(--recent-view-row-left-padding) +
+ var(--recent-view-body-border-width) -
+ var(--recent-view-header-border-width)
);
/* Match the row grid so "Channel" and "Conversation" sort
spans align with channel and topic text in rows. Sort