Skip to content

Commit e5c1020

Browse files
saimalshaficlaude
andcommitted
Fix PWA bottom spacing using env() + max() without media query
Replace unreliable @media (display-mode: standalone) override with a single :root rule using max() — in browser env() returns 0px so values stay at 20px/80px, in PWA they grow to safe-area + 10px / safe-area + 65px. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2d3ee92 commit e5c1020

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Feather.jsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,10 @@ const GlobalStyle = (
398398
html, body, #root { margin: 0; padding: 0; height: 100%; }
399399
html { color-scheme: light; background-color: #ffffff; }
400400
body { overscroll-behavior: none; background-color: #ffffff; }
401-
:root { --bottom-gap: 20px; --content-bottom: 80px; }
402-
@media (display-mode: standalone) {
403-
:root {
404-
--bottom-gap: calc(env(safe-area-inset-bottom, 0px) + 10px);
405-
--content-bottom: calc(env(safe-area-inset-bottom, 0px) + 65px);
406-
}
401+
:root {
402+
--safe-bottom: env(safe-area-inset-bottom, 0px);
403+
--bottom-gap: max(20px, calc(var(--safe-bottom) + 10px));
404+
--content-bottom: max(80px, calc(var(--safe-bottom) + 65px));
407405
}
408406
.feather-noscroll::-webkit-scrollbar { display: none; }
409407
.feather-noscroll { scrollbar-width: none; -ms-overflow-style: none; }

0 commit comments

Comments
 (0)