From 9670ef44031cc4f80588ec44848b814e252df334 Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Sat, 6 Dec 2025 22:48:45 +0000 Subject: [PATCH] Improve SPA UI integration to the system --- web/index.html | 5 ++++- web/main/index.css | 22 ++++++++++++++++++++++ web/main/sizes.css | 4 ++++ web/ui/navbar/index.svelte | 22 ++++++---------------- web/ui/popup.svelte | 4 ++++ web/ui/popupable-page.svelte | 4 +++- 6 files changed, 43 insertions(+), 18 deletions(-) diff --git a/web/index.html b/web/index.html index e5f249cb..ebfa5986 100644 --- a/web/index.html +++ b/web/index.html @@ -5,7 +5,10 @@ - + Slow Reader :global { - /* Change mobile Chrome bottom panel to fit with navbar */ - body { - background: var(--land-color); - - @media (--no-desktop) { - :root.has-navbar & { - background: var(--main-land-color); - - /* For Safari */ - @supports (-webkit-touch-callout: none) { - background: var(--land-color); - } - } - } - } - .navbar { position: fixed; inset-block: 0; @@ -243,6 +227,12 @@ .navbar:not(.is-opened) & { box-shadow: var(--bottom-panel-shadow); } + + @media (display-mode: standalone) { + padding-bottom: calc( + env(safe-area-inset-bottom) + var(--navbar-padding) + ); + } } } diff --git a/web/ui/popup.svelte b/web/ui/popup.svelte index 63be5e76..79b5e3c8 100644 --- a/web/ui/popup.svelte +++ b/web/ui/popup.svelte @@ -128,6 +128,10 @@ height: var(--navbar-height); box-shadow: var(--bottom-panel-shadow); + + @media (display-mode: standalone) { + padding-bottom: env(safe-area-inset-bottom); + } } } diff --git a/web/ui/popupable-page.svelte b/web/ui/popupable-page.svelte index f5a648c6..87f3e095 100644 --- a/web/ui/popupable-page.svelte +++ b/web/ui/popupable-page.svelte @@ -38,7 +38,9 @@ } @media (--no-desktop) { - min-height: calc(100svh - var(--navbar-height)); + min-height: calc( + 100svh - var(--navbar-height) - env(safe-area-inset-top) + ); } @media (--mobile) {