mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:40:49 +00:00
fix: contain iOS standalone viewport (#76072)
Contain the Control UI document in iOS Add-to-Home-Screen standalone mode by enabling viewport-fit=cover, applying safe-area-aware body locking, and constraining the app root so inner panes own scrolling. Thanks @kvncrw.
This commit is contained in:
@@ -106,6 +106,10 @@
|
||||
--duration-fast: 100ms;
|
||||
--duration-normal: 180ms;
|
||||
--duration-slow: 300ms;
|
||||
--safe-area-top: env(safe-area-inset-top, 0px);
|
||||
--safe-area-right: env(safe-area-inset-right, 0px);
|
||||
--safe-area-bottom: env(safe-area-inset-bottom, 0px);
|
||||
--safe-area-left: env(safe-area-inset-left, 0px);
|
||||
|
||||
color-scheme: dark;
|
||||
}
|
||||
@@ -532,6 +536,40 @@ openclaw-app {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
@media (display-mode: standalone) {
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
|
||||
@supports (height: 100dvh) {
|
||||
html,
|
||||
body {
|
||||
height: 100dvh;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
padding-top: var(--safe-area-top);
|
||||
padding-right: var(--safe-area-right);
|
||||
padding-bottom: var(--safe-area-bottom);
|
||||
padding-left: var(--safe-area-left);
|
||||
}
|
||||
|
||||
openclaw-app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--accent);
|
||||
text-decoration: underline;
|
||||
|
||||
Reference in New Issue
Block a user