|
17 | 17 | padding-top: env(safe-area-inset-top, 0px); |
18 | 18 | display: flex; |
19 | 19 | align-items: center; |
20 | | - background: var(--surface); |
21 | | - border-bottom: 1px solid var(--border); |
| 20 | + background: linear-gradient(to bottom, var(--surface) 0%, var(--surface) 35%, var(--bg) 100%); |
22 | 21 | gap: 2px; |
23 | 22 | position: fixed; |
24 | 23 | top: 0; |
|
181 | 180 | .terminalArea { |
182 | 181 | position: absolute; |
183 | 182 | top: calc(40px + env(safe-area-inset-top, 0px)); |
184 | | - bottom: calc(80px + env(safe-area-inset-bottom, 0px) + var(--keyboard-height, 0px)); |
| 183 | + /* TouchBar height (71px) + capped home-indicator gap + keyboard height. |
| 184 | + iOS Safari does not shrink the layout viewport when the keyboard opens, |
| 185 | + so we must explicitly offset by --keyboard-height (set by |
| 186 | + useMobileKeyboard via visualViewport). */ |
| 187 | + bottom: calc(71px + min(env(safe-area-inset-bottom, 0px), 2px) + var(--keyboard-height, 0px)); |
185 | 188 | left: 0; |
186 | 189 | right: 0; |
187 | 190 | display: flex; |
188 | 191 | min-height: 0; |
189 | 192 | background: var(--bg); |
190 | 193 | } |
191 | 194 |
|
192 | | -/* Copilot chat hides the TouchBar — reclaim its space */ |
| 195 | +/* When the keyboard is open, the touchbar's home-indicator padding is |
| 196 | + covered by the keyboard, so the terminal can sit directly on top of the |
| 197 | + 71px touchbar core (above the keyboard). */ |
| 198 | +.layout[data-keyboard-open] .terminalArea { |
| 199 | + bottom: calc(71px + var(--keyboard-height, 0px)); |
| 200 | +} |
| 201 | + |
| 202 | +/* Copilot chat hides the TouchBar — reclaim its space (no keyboard offset |
| 203 | + needed because TerminalPane handles its own resize/scroll-into-view). */ |
193 | 204 | .layout[data-hide-touchbar] .terminalArea { |
194 | | - bottom: calc(env(safe-area-inset-bottom, 0px) + var(--keyboard-height, 0px)); |
| 205 | + bottom: calc(min(env(safe-area-inset-bottom, 0px), 2px) + var(--keyboard-height, 0px)); |
195 | 206 | } |
196 | 207 |
|
197 | 208 | .split { |
|
258 | 269 | } |
259 | 270 | .terminalArea { |
260 | 271 | top: calc(32px + env(safe-area-inset-top, 0px)); |
261 | | - bottom: calc(44px + env(safe-area-inset-bottom, 0px) + var(--keyboard-height, 0px)); |
| 272 | + bottom: calc(44px + min(env(safe-area-inset-bottom, 0px), 2px) + var(--keyboard-height, 0px)); |
262 | 273 | } |
263 | | - /* TouchBar hides when keyboard is open — remove its offset */ |
| 274 | + /* TouchBar hides when keyboard is open in landscape — sit directly on |
| 275 | + top of the keyboard, no touchbar offset. */ |
264 | 276 | .layout[data-keyboard-open] .terminalArea { |
265 | | - bottom: calc(env(safe-area-inset-bottom, 0px) + var(--keyboard-height, 0px)); |
| 277 | + bottom: var(--keyboard-height, 0px); |
266 | 278 | } |
267 | 279 | /* Copilot chat hides TouchBar — reclaim its space */ |
268 | 280 | .layout[data-hide-touchbar] .terminalArea { |
269 | | - bottom: calc(env(safe-area-inset-bottom, 0px) + var(--keyboard-height, 0px)); |
| 281 | + bottom: var(--keyboard-height, 0px); |
270 | 282 | } |
271 | 283 | } |
272 | 284 |
|
|
0 commit comments