Fix mobile pinch zoom and content overlapping header/footer on iOS Safari (#3)

* Fix mobile pinch zoom and content overlapping header/footer on iOS Safari

Add viewport export with maximumScale=1 and userScalable=false to prevent
pinch-to-zoom. Add viewportFit=cover for proper safe area support.

Fix content rendering above the sticky header and below the fixed mobile
tab bar on iOS Safari by adding relative z-0 to the content wrapper,
creating a stacking context that keeps page content below both navigation
elements.

https://claude.ai/code/session_01Re8ndXPAMVMtiHZFVNDK7S

* Add safe area inset support for iOS 26 and fix film grain z-index

- Add safe-area-inset-top padding to NavBar for notch/Dynamic Island
- Add safe-area-inset-left/right to NavBar, main content, and
  MobileTabBar for landscape mode
- Account for safe-area-inset-bottom in content wrapper padding so
  content isn't hidden behind MobileTabBar + home indicator
- Lower film grain overlay z-index from 9999 to 1 to avoid triggering
  iOS 26 Safari's fixed-element tab tinting behavior

https://claude.ai/code/session_01Re8ndXPAMVMtiHZFVNDK7S

* Hide ambient glow on mobile where it overwhelms the viewport

The 800x600px blurred glow blob dominates narrow mobile screens and
clashes with title backdrop images. Hidden below sm breakpoint.

https://claude.ai/code/session_01Re8ndXPAMVMtiHZFVNDK7S

* Fix asymmetric safe-area insets using separate pl/pr padding

The previous px-[max(...,env(safe-area-inset-left))] shorthand applied
only the left inset to both sides. Split into separate pl/pr with the
correct env() variable for each side.

https://claude.ai/code/session_01Re8ndXPAMVMtiHZFVNDK7S

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
2026-03-06 09:41:47 -05:00
committed by GitHub
co-authored by Claude
parent 4d966bfbc2
commit 57ce0fd85d
5 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ export function MobileTabBar() {
if (!session?.user) return null;
return (
<nav className="fixed bottom-0 left-0 right-0 z-50 border-t border-border/50 bg-background/90 backdrop-blur-xl sm:hidden">
<nav className="fixed bottom-0 left-0 right-0 z-50 border-t border-border/50 bg-background/90 pl-[env(safe-area-inset-left)] pr-[env(safe-area-inset-right)] backdrop-blur-xl sm:hidden">
<div className="flex h-14 items-stretch">
{tabs.map((tab) => {
const Icon = tab.icon;
+2 -2
View File
@@ -28,8 +28,8 @@ export function NavBar() {
const setCommandPaletteOpen = useSetAtom(commandPaletteOpenAtom);
return (
<header className="sticky top-0 z-50 border-b border-border/50 bg-background/80 backdrop-blur-xl">
<nav className="mx-auto flex h-14 max-w-6xl items-center justify-between gap-5 px-4 sm:gap-0 sm:px-6">
<header className="sticky top-0 z-50 border-b border-border/50 bg-background/80 pt-[env(safe-area-inset-top)] backdrop-blur-xl">
<nav className="mx-auto flex h-14 max-w-6xl items-center justify-between gap-5 pl-[max(1rem,env(safe-area-inset-left))] pr-[max(1rem,env(safe-area-inset-right))] sm:gap-0 sm:pl-[max(1.5rem,env(safe-area-inset-left))] sm:pr-[max(1.5rem,env(safe-area-inset-right))]">
<div className="flex items-center gap-3 sm:gap-6">
<Link
href="/dashboard"