fix: adjust iOS Safari safe area handling for bottom navigation

This commit is contained in:
shimonz
2025-07-29 16:30:23 +08:00
parent 08c979c939
commit 193902af7c
4 changed files with 4 additions and 15 deletions

View File

@@ -1 +1 @@
20250729151638 20250729163024

View File

@@ -11,11 +11,6 @@
.scrollbar-hide::-webkit-scrollbar { .scrollbar-hide::-webkit-scrollbar {
display: none; /* Chrome, Safari and Opera */ display: none; /* Chrome, Safari and Opera */
} }
/* iOS Safari 安全区域工具类 */
.pb-safe-bottom {
padding-bottom: env(safe-area-inset-bottom);
}
} }
:root { :root {
@@ -28,15 +23,10 @@ body {
overflow-x: hidden; overflow-x: hidden;
/* 阻止 iOS Safari 拉动回弹 */ /* 阻止 iOS Safari 拉动回弹 */
overscroll-behavior: none; overscroll-behavior: none;
/* 支持 iOS Safari 安全区域 */
padding: env(safe-area-inset-top) env(safe-area-inset-right)
env(safe-area-inset-bottom) env(safe-area-inset-left);
} }
body { body {
color: rgb(var(--foreground-rgb)); color: rgb(var(--foreground-rgb));
/* iOS Safari 安全区域背景适配 */
background-color: #f7f7f3;
} }
html:not(.dark) body { html:not(.dark) body {

View File

@@ -40,10 +40,9 @@ const PageLayout = ({ children, activePath = '/' }: PageLayoutProps) => {
{/* 主内容 */} {/* 主内容 */}
<main <main
className='flex-1 md:min-h-0 pb-safe-bottom md:pb-0' className='flex-1 md:min-h-0 mb-14 md:mb-0'
style={{ style={{
paddingBottom: paddingBottom: 'calc(3.5rem + env(safe-area-inset-bottom))',
'max(3.5rem, calc(3.5rem + env(safe-area-inset-bottom)))',
}} }}
> >
{children} {children}

View File

@@ -2,7 +2,7 @@
'use client'; 'use client';
const CURRENT_VERSION = '20250729151638'; const CURRENT_VERSION = '20250729163024';
// 版本检查结果枚举 // 版本检查结果枚举
export enum UpdateStatus { export enum UpdateStatus {