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: Set em-based min and max width, flexible column width.

Karl Stolleyc2cf7ef57174
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index 129a7cd0aae..aa923c06859 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -262,7 +262,9 @@
--left-sidebar-width: min(33.3333%, var(--left-sidebar-max-width));
/* 40px (toggle icon) + 5px (gap) + 20px logo + 10px right margin */
--left-sidebar-width-with-realm-icon-logo: 75px;
- --right-column-width: 250px;
+ /* 288px at 14px/1em */
+ --right-column-max-width: 20.57em;
+ --right-column-width: clamp(10em, 50%, var(--right-column-max-width));
--right-sidebar-width: calc(var(--right-column-width) - 10px);
/* The width of the icon is reduced by 2px, to account for 2px
of top and bottom margin needed for hover backgrounds to
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index fedfde4af0b..d67d5c1615d 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -338,7 +338,7 @@ body.has-overlay-scrollbar {
/* This applies to column-left both in navbar and app. */
.column-right {
width: var(--right-column-width);
- max-width: var(--right-column-width);
+ max-width: var(--right-column-max-width);
position: absolute;
right: 0;
top: 0;