-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add viewport segments api demo #325
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
Add viewport segments api demo #325
Conversation
@darktears, would you be able to help me test this demo? I adapted the viewport segments CSS from one of your demos, and didn't change it that much. |
The demo doesn't look quite right on my Z Fold 4. But I can see similar issues on the DevTools when I use the Device Emulation mode and pick the Z Fold 5 or the Asus Zenbook Fold. I think you can go 99% of the way with the DevTools. And my demos work, I just checked them with the Z Fold 4. |
Thanks for the code review, @darktears! This is now ready for the MDN team to review and get merged. |
@pepelsbey this is ready for a look, if you fancy it ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Vadim Makeev <[email protected]>
Co-authored-by: Vadim Makeev <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect :) Thank you!
Chrome 138 adds the Viewport Segments API, which provides a way to access the position and dimensions of logically separate viewport regions. Viewport segments are created when the viewport is split by one or more hardware features (such as a fold or a hinge between separate displays).
This PR adds an example to demonstrate how to use it.