Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Keep the fixed-width dashboard header from collapsing next to an open editing sidebar (#79431)

Andrei Chernykhb408a5b32ffd
diff --git a/frontend/src/metabase/dashboard/components/DashboardHeader/DashboardHeaderView.module.css b/frontend/src/metabase/dashboard/components/DashboardHeader/DashboardHeaderView.module.css
index 0d048896cf1..6f891cda5aa 100644
--- a/frontend/src/metabase/dashboard/components/DashboardHeader/DashboardHeaderView.module.css
+++ b/frontend/src/metabase/dashboard/components/DashboardHeader/DashboardHeaderView.module.css
@@ -21,11 +21,8 @@
.HeaderContainer {
&.isFixedWidth.offsetSidebar {
- margin-right: var(--sidebar-width);
- }
-
- @container dashboard-header (max-width: 40rem) {
- margin-right: 0;
+ /* Shrink the offset instead of dropping it at 40rem, so the header never jumps. Must match the stacking breakpoint below. */
+ margin-right: clamp(0px, calc(100cqw - 40rem), var(--sidebar-width));
}
}