fix: 안드로이드 토스에서 탭바 아래가 약 56px 비어 보이던 것 — 토스 웹뷰는 하단 내비게이션 바 위에서 끝나는데도 safe-area-inset-bottom 을 알려 줘 여백이 두 번 들어갔음. 하단 안전 영역을 --sab 변수 하나로 모으고(탭바·페이지 아래 여백·문의 버튼·창·게임·포스트 오류 문구), 안드로이드 토스일 때만 0 으로 둠. 웹·앱·아이폰 토스는 그대로(아이폰 토스는 확인하지 못함). 갤럭시 Z 플립 5 에서 확인

This commit is contained in:
skkim committed 2026-11-23 09:46:25 +09:00
1 parent 2b1fa58f56
commit 8ea9f8f04b
6 files changed
+12 -7

No files matched your search

+3 -3
View File
@@ -114,7 +114,7 @@ function FloatButton() {
type="button"
onClick={down ? toTop : () => open({ type: 'contact' })}
aria-label={down ? '맨 위로' : '문의하기'}
className="fixed right-[max(12px,calc((100%-440px)/2+12px))] bottom-[calc(80px+env(safe-area-inset-bottom,0px))] z-20 size-14 cursor-pointer rounded-full drop-shadow-[0_6px_10px_rgb(40_48_74/0.22)]"
className="fixed right-[max(12px,calc((100%-440px)/2+12px))] bottom-[calc(80px+var(--sab))] z-20 size-14 cursor-pointer rounded-full drop-shadow-[0_6px_10px_rgb(40_48_74/0.22)]"
>
<Ic name={down ? 'top' : 'contact'} className="size-full" />
</button>
@@ -306,13 +306,13 @@ function Shell() {
</div>
)}
<div className="fixed inset-x-0 top-0 z-[19] h-[env(safe-area-inset-top,0px)] transition-colors duration-1400" style={{ backgroundColor: NOTCH_BG[kind] }} aria-hidden="true" />
<div className="relative mx-auto min-h-dvh max-w-[440px] overflow-x-clip pb-[calc(104px+env(safe-area-inset-bottom,0px))]">
<div className="relative mx-auto min-h-dvh max-w-[440px] overflow-x-clip pb-[calc(104px+var(--sab))]">
<TopBar />
<main className="relative z-[1]">
<Outlet />
</main>
<FloatButton />
<nav aria-label="주요 메뉴" className="b-tabbar fixed inset-x-0 bottom-0 z-30 grid grid-cols-5 border-t px-[max(4px,calc((100%-432px)/2))] pt-[7px] pb-[calc(8px+env(safe-area-inset-bottom,0px))] backdrop-blur-[10px]">
<nav aria-label="주요 메뉴" className="b-tabbar fixed inset-x-0 bottom-0 z-30 grid grid-cols-5 border-t px-[max(4px,calc((100%-432px)/2))] pt-[7px] pb-[calc(8px+var(--sab))] backdrop-blur-[10px]">
{TABS.map((t) =>
t.key === 'today' ? (
// 메인 탭: 막대 위로 솟은 큰 주황 동그라미
+1 -1
View File
@@ -236,7 +236,7 @@ export function CloudMergePage() {
// 스택 화면: 머리줄·탭을 덮게 body 로 띄운다(main 이 쌓임 순서를 가둬서). b-app 의 낮 색을 그대로 써 밤에도 밝은 바탕
return createPortal(
<div className="b-app fixed inset-0 z-[45] touch-none bg-[linear-gradient(#d9edff,#f5faff)]">
<div className="mx-auto flex h-full max-w-[440px] flex-col pt-[env(safe-area-inset-top,0px)] pb-[calc(10px+env(safe-area-inset-bottom,0px))] text-(--ink)">
<div className="mx-auto flex h-full max-w-[440px] flex-col pt-[env(safe-area-inset-top,0px)] pb-[calc(10px+var(--sab))] text-(--ink)">
<div className="flex items-center gap-1 px-3 pt-2">
<button type="button" onClick={back} aria-label="뒤로" className={cx('relative grid size-9 shrink-0 cursor-pointer place-items-center rounded-full bg-white/80 text-[22px] font-bold shadow-[0_4px_10px_rgb(40_48_74/0.08)]', TAP44)}>
‹
+1 -1
View File
@@ -496,7 +496,7 @@ function FullCard({ post }: PostProps) {
document.body,
)}
{likeFailed > 0 && createPortal(
<p role="alert" className="pointer-events-none fixed inset-x-0 bottom-[calc(88px+env(safe-area-inset-bottom,0px))] z-50 m-0 flex justify-center px-4">
<p role="alert" className="pointer-events-none fixed inset-x-0 bottom-[calc(88px+var(--sab))] z-50 m-0 flex justify-center px-4">
<span className="rounded-full bg-[rgb(30_36_56/0.82)] px-3.5 py-2 text-[13px] font-bold text-white">{liked ? '좋아요를 취소하지 못했어요' : '좋아요를 반영하지 못했어요'}. 다시 해 주세요.</span>
</p>,
document.body,
+1 -1
View File
@@ -159,7 +159,7 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
className={cx('b-sheet-dialog b-app fixed inset-x-0 top-auto bottom-0 m-0 mx-auto max-h-[86dvh] w-full max-w-[440px] overflow-visible bg-transparent p-0 text-(--ink)', closing && 'b-sheet-closing')}
>
{shown && (
<div className="b-sheet flex max-h-[86dvh] flex-col rounded-t-[22px] bg-white pb-[env(safe-area-inset-bottom,0px)]">
<div className="b-sheet flex max-h-[86dvh] flex-col rounded-t-[22px] bg-white pb-[var(--sab)]">
<div className="relative border-b border-(--line) px-4 pt-2 pb-2.5 text-center">
<div className="mx-auto mb-2.5 h-1 w-10 rounded-full bg-(--line)" aria-hidden="true" />
<h3 className="m-0 text-[15px] font-extrabold">{title}</h3>
+2
View File
@@ -13,6 +13,8 @@
@layer base {
html {
/* 화면 아래 안전 영역(홈 바). 토스는 웹뷰가 이미 그 위에서 끝나서 main.tsx 가 0 으로 바꾼다 */
--sab: env(safe-area-inset-bottom, 0px);
word-break: keep-all;
overflow-wrap: break-word;
-webkit-text-size-adjust: 100%;
+4 -1
View File
@@ -7,11 +7,14 @@ import './api/setup'
import App from './App.tsx'
import './b/install'
import { track } from './lib/analytics'
import { APP_VERSION, IS_APP } from './lib/platform'
import { APP_VERSION, IS_APP, IS_TOSS } from './lib/platform'
// index.html 의 첫 화면이 멈췄을 때 앱 파일까지는 실행됐는지 가르는 표시
;(window as Window & { __appStarted?: boolean }).__appStarted = true
// 안드로이드 토스 웹뷰는 하단 내비게이션 바 위에서 끝나는데도 safe-area-inset-bottom 을 알려 줘, 그대로 쓰면 탭바 아래가 비어 보인다 (갤럭시 Z 플립 5 에서 약 56px). 아이폰 토스는 확인하지 못해 그대로 둔다
if (IS_TOSS && /Android/i.test(navigator.userAgent)) document.documentElement.style.setProperty('--sab', '0px')
// iOS는 user-scalable=no를 무시해서 두 손가락 확대를 직접 막는다
for (const type of ['gesturestart', 'gesturechange']) document.addEventListener(type, (e) => e.preventDefault(), { passive: false })