Edge-to-edge mobile layout with safe-area insets
The public menu (and editor) left a non-matching rectangular gap around the iPhone notch / dynamic island. Make the glassmorphism background go edge-to-edge while keeping interactive content clear of the unsafe regions. - viewport-fit=cover so the layout uses the full screen incl. behind the island - Safe-area utility classes (globals.css) built on env(safe-area-inset-*); they resolve to 0 on devices without insets, preserving previous spacing - Public menu: header padding-top, sticky section tabs offset, and floating action buttons (Ask AI / +) respect top/bottom insets - Editor: header padding-top and bottom tab bar respect top/bottom insets Verified: build passes; all safe-area classes survive Tailwind purge; rendered meta tag emits viewport-fit=cover.
This commit is contained in:
1 parent
9fad1d43aa
commit
d71ede3d00
4 files changed
+35
-5
No files matched your search
@@ -28,7 +28,7 @@ export default function Editor({ data, baseUrl }: { data: EditorData; baseUrl: s
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="mx-auto min-h-screen max-w-2xl px-4 pb-28 pt-4">
|
||||
<div className="safe-pt-editor mx-auto min-h-screen max-w-2xl px-4 pb-28">
|
||||
<header className="mb-3 flex items-center justify-between gap-2">
|
||||
<div>
|
||||
<h1 className="display text-xl font-semibold leading-tight">{data.name}</h1>
|
||||
@@ -67,7 +67,7 @@ export default function Editor({ data, baseUrl }: { data: EditorData; baseUrl: s
|
||||
)}
|
||||
|
||||
{/* Bottom tab bar */}
|
||||
<nav className="glass fixed bottom-0 left-1/2 z-30 flex w-full max-w-2xl -translate-x-1/2 items-stretch justify-around rounded-t-3xl px-2 py-2">
|
||||
<nav className="glass safe-pb-tabbar fixed bottom-0 left-1/2 z-30 flex w-full max-w-2xl -translate-x-1/2 items-stretch justify-around rounded-t-3xl px-2 pt-2">
|
||||
{tabs.map((x) => (
|
||||
<button
|
||||
key={x.id}
|
||||
|
||||
Reference in new issue
Block a user