From dc5258a3151a40f47363fa047159bfb9e571aa2b Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Mon, 24 Aug 2026 07:32:21 +0100 Subject: [PATCH] fix: reserve topbar height so account controls popping in don't shift it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AccountMenu renders nothing at all while auth.status is "loading", then either plain text or a .btn-account pill once it resolves — the pill is taller than a bare text line, so the topbar grew the moment it appeared. min-height on .topbar, derived from .btn-account's own line-height + padding + border (the tallest thing the bar ever holds), reserves that space from the first paint regardless of which AccountMenu state is showing. --- web/src/app.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/src/app.css b/web/src/app.css index 8155e66..cfb3328 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -15,6 +15,15 @@ gap: 1rem; padding: 1.25rem var(--edge) 0; font-size: 0.9rem; + /* AccountMenu renders nothing at all until auth.status leaves "loading", + then either plain text or a .btn-account pill — .btn-account is the + tallest thing the bar ever holds, so reserving its height up front is + what stops the bar growing the moment a button appears. Derived from + .btn-account's own box below rather than guessed: line-height (1.6, + inherited unitless from body, resolved against .btn-account's own + 0.85rem) + its 0.45em top/bottom padding (also relative to 0.85rem) + + its 1px border on each edge. Update this if any of those three change. */ + min-height: calc(1.6 * 0.85rem + 2 * 0.45 * 0.85rem + 2px); } /* A macOS menu-bar split: identity + static nav on the left, the signed-in -- 2.51.2