Viewport Segments API

Aperta
#1,440 1 commento 8 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
css, javascript
Ambito
api, frontend, web-dev

Direzione di ricerca

Review the linked W3C specifications and the existing web-platform-tests at https://wpt.fyi/results/viewport/viewport-segments.html. Understand the CSS media queries, environment variables, and JavaScript API for viewport segments. The task likely involves creating or updating interoperability tests for this API, checking for correct behavior across different browser implementations. 'Done' means new or updated tests are added to the repository.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

focus-area-proposal
Description

Foldable phones, tablets, and multi-posture laptops represent a growing segment of hardware. While the Device Posture API indicates how a device is held (e.g., folded vs continuous), developers need exact geometric segment boundaries to position columns, sidebars, and critical interface elements without content falling into a physical hinge or fold seam.

The latter is provided by the Viewport Segments API. It exposes the positions, dimensions, and count of logically separate viewport regions formed when a viewport is split across physical folds, hinges, or dual-screen displays. It provides both declarative CSS tools (@media (*-viewport-segments) and env(viewport-segment-* x y)) and imperative JavaScript properties (window.viewport.segments).

Spec links:

Specification

(See description, as there are several specs involved)

web-feature

viewport-segments

Test Links
Additional Signals

(This features goes hand-in-hand with the Device Posture API, but serves a different purpose)

Lingua principale
JavaScript
Stelle
591
Fork
39
Merge medio
3h 8m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di web-platform-tests/interop

Tutte le issue di web-platform-tests/interop

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.