[Webkit-unassigned] [Bug 254868] New: Incorrect height values when viewport-fit=cover is set for installed web apps
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Apr 1 07:09:29 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=254868
Bug ID: 254868
Summary: Incorrect height values when viewport-fit=cover is set
for installed web apps
Product: WebKit
Version: Safari 16
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ik at rejh.nl
CC: bfulgham at webkit.org, simon.fraser at apple.com,
zalan at apple.com
Several css values and javascript APIs report incorrect height values for installed web apps when <meta name="content"> has "viewport-fit=cover".
The following values report heights of the available space *minus* safe-area-inset:
- 100svh
- -webkit-fill-available
- visualViewport.height
Note: It's very likely that this list is not complete, it's just what I ran into.
The workaround for CSS is fairly easy (but should not be needed):
```css
/* Use svh (with fallback for older versions) in regular safari: */
html, body {
min-height: -webkit-fill-available;
min-height: 100svh;
}
/* Switch to 'vh' when in standalone: */
@media all and (display-mode: standalone) {
html, body {
min-height: 100svh;
}
}
```
I'm not sure if there is a workaround for visualViewport.height though...
Related:
https://bugs.webkit.org/show_bug.cgi?id=237961
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230401/b8a861f5/attachment-0001.htm>
More information about the webkit-unassigned
mailing list