-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cssom-view] Expose small/large viewport dimensions of the layout viewport #8709
Comments
+1 to the general idea of exposing these values but I'd not that |
Imo there should be something like Having these large/small viewport values available would help authors to prepare a layout before the virtual keyboard is actually shown. I know this has been a request from the Ionic team, amongst others (the real problem there being that the Virtual Keyboard API does not trigger a
|
The small/large viewports are equally affected by the virtual-keyboard/"interactive-widget". It's only "scrolling UI" that insets the small viewport (i.e. mobile URL bar/bottom bars). In those cases, all insetting UI should shrink the smaller viewport (i.e. we inset by the top URL bar and a bottom bar if it exists) |
Thanks for correcting me @bokand – looks like I’m gonna need more coffee than usual today 🤦♂️. Updated my previous reply to strike out that part. |
Sure! Something like One thing that I’m now thinking about is the interaction with https://drafts.csswg.org/css-viewport/#interactive-widget-section because when using Would that need an event? Or can we assume authors to read it again when a |
Yeah, I'm fine with that.
I think using existing events for ProposingExpose a new endpoint for accessing the layout viewport, either |
This should definitely be stored on |
Currently there's no reliable way to get the small/large viewport dimensions.
There are some tricks in the wild for working with these values like inserting an element with something like
height: 100svh
and reading its height.It would be handy in some cases to have these values exposed on the
VisualViewport
interface for easy querying.I came across this when I was working on a polyfill for ViewTimeline, so I assume there are other common use-cases.
mentioning some folks who might be interested: @bramus @emilio
The text was updated successfully, but these errors were encountered: