From 85e6db67b52e83ccdd2607c47805d290e368eaf2 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Tue, 27 Oct 2026 07:39:56 +0000 Subject: [PATCH] fix: center mobile menu button in header row --- shared/packages/web-ui/src/lib/styles.css | 7 +++---- shared/shared-styles.css | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/shared/packages/web-ui/src/lib/styles.css b/shared/packages/web-ui/src/lib/styles.css index 6af6eda..63adc80 100644 --- a/shared/packages/web-ui/src/lib/styles.css +++ b/shared/packages/web-ui/src/lib/styles.css @@ -1096,12 +1096,11 @@ html[data-wide-layout='true'] .sc-main { padding: 0.75rem 1rem; } - /* top is pinned explicitly: with it unset, the button's static-position offset is - recomputed from the flex-wrap layout, which changes height once .sc-nav wraps onto - its own row on open - so the button visibly jumps vertically on click. */ + /* Center the button in the header's 4rem first row and pin it there: centering it against + the full header would make it jump when .sc-nav wraps onto its own row on open. */ .sc-mobile-menu-button { position: absolute; - top: 0.75rem; + top: calc((4rem - 2.25rem) / 2); left: 50%; display: grid; order: 3; diff --git a/shared/shared-styles.css b/shared/shared-styles.css index 8e50343..057cdad 100644 --- a/shared/shared-styles.css +++ b/shared/shared-styles.css @@ -1096,12 +1096,11 @@ html[data-wide-layout='true'] .sc-main { padding: 0.75rem 1rem; } - /* top is pinned explicitly: with it unset, the button's static-position offset is - recomputed from the flex-wrap layout, which changes height once .sc-nav wraps onto - its own row on open - so the button visibly jumps vertically on click. */ + /* Center the button in the header's 4rem first row and pin it there: centering it against + the full header would make it jump when .sc-nav wraps onto its own row on open. */ .sc-mobile-menu-button { position: absolute; - top: 0.75rem; + top: calc((4rem - 2.25rem) / 2); left: 50%; display: grid; order: 3;