Skip to content
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

Viewport Segments CSS and JS API #327

Open
darktears opened this issue Mar 6, 2024 · 0 comments
Open

Viewport Segments CSS and JS API #327

darktears opened this issue Mar 6, 2024 · 0 comments
Assignees
Labels
from: Intel Proposed, edited, or co-edited by Intel. topic: css Spec relates to CSS (Cascading Style Sheets) topic: device apis Spec relates to device APIs: access to device-specific hardware, sensors, and interfaces

Comments

@darktears
Copy link

WebKittens

No response

Title of the spec

CSS Viewport Segments

URL to the spec

https://drafts.csswg.org/css-env-1 https://www.w3.org/TR/mediaqueries-5/#mf-horizontal-viewport-segments

URL to the spec's repository

No response

Issue Tracker URL

No response

Explainer URL

https://github.com/WICG/visual-viewport/blob/gh-pages/segments-explainer/SEGMENTS-EXPLAINER.md

TAG Design Review URL

w3ctag/design-reviews#689

Mozilla standards-positions issue URL

mozilla/standards-positions#883

WebKit Bugzilla URL

No response

Radar URL

No response

Description

Specification or proposal URLs:

CSS : https://drafts.csswg.org/css-env-1/#viewport-segments and https://www.w3.org/TR/mediaqueries-5/#mf-horizontal-viewport-segments

JavaScript : https://wicg.github.io/visual-viewport/#dom-visualviewport-segments (Proposal to merge it into VisualViewport w3c/csswg-drafts#9285)

The Viewport Segments API allows developers to adapt their website/webapp layout to target foldable devices. The viewport segments defines the position and dimensions of a logically separate region of the viewport. 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) that act as a divider; segments are the regions of the viewport that can be treated as logically distinct by the author.

As this time this API applies only to Android and Windows OSes. Android provides the necessary OS APIs over here. Windows doesn't have an official API yet but instead relies on OEMs implementing the following specification in their middleware pre-installed software.

This API is to complimentary of the Device Posture API which also helps targeting foldable devices.

This API is enabled by default on Samsung Internet.
This API is enabled by default on some Microsoft Edge platforms.

TAG review w3ctag/design-reviews#689 and w3ctag/design-reviews#690.

@annevk annevk added topic: css Spec relates to CSS (Cascading Style Sheets) from: Intel Proposed, edited, or co-edited by Intel. labels Mar 6, 2024
@hober hober added the topic: device apis Spec relates to device APIs: access to device-specific hardware, sensors, and interfaces label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Intel Proposed, edited, or co-edited by Intel. topic: css Spec relates to CSS (Cascading Style Sheets) topic: device apis Spec relates to device APIs: access to device-specific hardware, sensors, and interfaces
Projects
None yet
Development

No branches or pull requests

5 participants