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: Round last row's corners without overflow: hidden.

Shubham Padia08402ec08d6f
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index da384c82615..dac5a4abbcb 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -1163,6 +1163,18 @@
--recent-view-participants-padding-x-start: 0.25em; /* 4px at 16px / 1em */
--recent-view-table-border-radius: 5px;
--recent-view-table-border-bottom-width: 1px;
+ /* Inner radius used on the last row's corner cells, so they
+ hug the container's rounded bottom corners. Derived from
+ the outer radius minus the border widths, which lets it
+ track dark mode's wider side border. */
+ --recent-view-table-inner-radius: calc(
+ var(--recent-view-table-border-radius) -
+ var(--recent-view-table-border-side-width)
+ )
+ calc(
+ var(--recent-view-table-border-radius) -
+ var(--recent-view-table-border-bottom-width)
+ );
--color-border-recent-view-row: light-dark(
hsl(0deg 0% 87%),
hsl(0deg 0% 0% / 20%)
diff --git a/web/styles/recent_view.css b/web/styles/recent_view.css
index 342ee3be2a8..48f49073390 100644
--- a/web/styles/recent_view.css
+++ b/web/styles/recent_view.css
@@ -34,7 +34,6 @@
border-bottom-width: var(--recent-view-table-border-bottom-width);
border-radius: 0 0 var(--recent-view-table-border-radius)
var(--recent-view-table-border-radius);
- overflow: hidden;
}
#recent_view {
@@ -444,6 +443,22 @@
background-color: var(--color-background-recent-view-row);
}
+ /* Round the last row's bottom corners to hug the
+ container's rounded bottom corners. */
+ &:last-child {
+ & td:first-child {
+ border-bottom-left-radius: var(
+ --recent-view-table-inner-radius
+ );
+ }
+
+ & td:last-child {
+ border-bottom-right-radius: var(
+ --recent-view-table-inner-radius
+ );
+ }
+ }
+
/* Avoid annoying, confusing hover-state when scrolling on
touch devices like iPad that treat a tap-and-hold/swipe
as a hover. */
@@ -822,6 +837,15 @@
thead .last_msg_time_header {
display: none;
}
+
+ /* With the timestamp cell hidden, the topic name cell
+ is the last visible one in the row, so round its
+ bottom-right corner too. */
+ tr:last-child .recent_topic_name {
+ border-bottom-right-radius: var(
+ --recent-view-table-inner-radius
+ );
+ }
}
.recent_topic_actions {