fix(ui): native header top safe-area under edge-to-edge

The earlier safe-area fix reached the bottom bars (they apply
--tg-safe-bottom) but not the header: its top inset lived only in a
Telegram-fullscreen-scoped rule, so on the native build the header .bar had
just 5px top padding and its content sat under the status bar (measured: the
title at y=11px behind the 54px bar; the back button untappable). Give .bar a
top inset from the SystemBars plugin's --safe-area-inset-top (native-only via
the plugin var; unset -> 0 on web/PWA/Telegram/VK, so no regression;
tg-fullscreen still overrides via specificity). Verified on-device (Pixel_10 /
API 37): the title moved from y=11 to y=65, clear of the status bar.
This commit is contained in:
Ilia Denisov
2026-07-12 19:22:12 +02:00
parent 4a0689a4ac
commit 49c53794f4
3 changed files with 23 additions and 10 deletions
+5
View File
@@ -101,6 +101,11 @@
align-items: center;
gap: var(--gap);
padding: 5px var(--pad);
/* Clear the top safe area on the native build: under Android 15+ edge-to-edge the WebView draws
behind the status bar, so the header row must drop below it. --safe-area-inset-top is injected by
the Capacitor SystemBars plugin (native only — unset, so 0, on web / PWA / Telegram / VK, which do
not draw behind our header). Telegram fullscreen overrides this with its own nav-band rule below. */
padding-top: calc(var(--safe-area-inset-top, 0px) + 5px);
}
h1 {
font-size: 1.05rem;