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.

navbar: Handle offsets for manually hidden navigation.

Karl Stolleye12168935e0b
diff --git a/web/src/css_variables.ts b/web/src/css_variables.ts
index da929c506f1..cd0347e8f93 100644
--- a/web/src/css_variables.ts
+++ b/web/src/css_variables.ts
@@ -36,6 +36,7 @@ export const media_breakpoints = {
export const container_breakpoints = {
cq_xl_min: xl / base_em_px + "em",
+ cq_lg_min: lg / base_em_px + "em",
cq_md_min: md / base_em_px + "em",
cq_mm_min: mm / base_em_px + "em",
};
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index 1e76954e529..044818f2ed3 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -1599,11 +1599,11 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
.app-main .column-middle {
margin-left: 7px;
}
+ }
- @container header-container (width > $cq_md_min) {
- #navbar-middle {
- margin-left: var(--middle-column-left-margin-fluid-layout);
- }
+ @container header-container (width > $cq_md_min) {
+ #navbar-middle {
+ margin-left: var(--middle-column-left-margin-fluid-layout);
}
}
@@ -1613,6 +1613,12 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
}
}
+ @container header-container (width < $cq_md_min) {
+ #navbar-middle {
+ margin-left: 0;
+ }
+ }
+
@container app (width < $cq_xl_min) {
#compose-content,
.app-main .column-middle {
@@ -1621,6 +1627,17 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
}
}
+/* Media-query fallback for the cinched-up logo presentation. */
+@media (width > $md_min) {
+ .without-container-query-support {
+ &.hide-left-sidebar {
+ #navbar-middle {
+ margin-left: var(--middle-column-left-margin-fluid-layout);
+ }
+ }
+ }
+}
+
body:not(.hide-left-sidebar) {
/* User can clearly see the unread count in the left sidebar. So,
we don't need an indicator here as it will only serve as a disctraction. */
@@ -1677,7 +1694,10 @@ body:not(.hide-left-sidebar) {
}
.top-navbar-container {
- margin-left: 40px;
+ /* The --header-height variable is used to make
+ the squared toggle area, so we offset it
+ accordingly. */
+ margin-left: var(--header-height);
}
}