dongsik22 commited on
Commit
c09337e
·
1 Parent(s): 23b5cb1

chore(twa): cutout/제스처바 영역 검은 배경 박스 시도

Browse files

html::before fixed 박스를 safe-area-inset 음수 만큼 viewport 바깥으로 확장.
Chrome Custom Tabs(TWA)가 cutout/제스처바 영역을 흰색으로 그리는 걸 가리기 위한 trick.
효과 보장 없음(TWA 구조상 OS 영역 제어 한계).

Files changed (1) hide show
  1. index.html +10 -0
index.html CHANGED
@@ -32,6 +32,16 @@
32
  html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
33
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
34
  overscroll-behavior: none; }
 
 
 
 
 
 
 
 
 
 
35
  body { min-height: 100dvh; }
36
  button { font-family: inherit; }
37
  input { font-family: inherit; font-size: 16px; /* iOS 줌 방지 */ }
 
32
  html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
33
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
34
  overscroll-behavior: none; }
35
+ /* TWA cutout/제스처바 흰 띠 가림 시도 — viewport 바깥(safe-area)을 어두운 배경 박스로 덮음.
36
+ Chrome Custom Tabs가 OS 영역을 자기 흰색으로 그리는 걸 가리기 위한 트릭. 효과 없을 수도 있음. */
37
+ html::before {
38
+ content: ""; position: fixed; z-index: -1; pointer-events: none;
39
+ top: calc(-1 * env(safe-area-inset-top, 0px));
40
+ right: calc(-1 * env(safe-area-inset-right, 0px));
41
+ bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
42
+ left: calc(-1 * env(safe-area-inset-left, 0px));
43
+ background: var(--bg);
44
+ }
45
  body { min-height: 100dvh; }
46
  button { font-family: inherit; }
47
  input { font-family: inherit; font-size: 16px; /* iOS 줌 방지 */ }