-
Notifications
You must be signed in to change notification settings - Fork 32
Description
WebKittens
Title of the proposal
Layout Instability API CSS pixel attribution
URL to the spec
https://wicg.github.io/layout-instability/
URL to the spec's repository
https://github.com/WICG/layout-instability
Issue Tracker URL
No response
Explainer URL
TAG Design Review URL
No response
Mozilla standards-positions issue URL
No response
WebKit Bugzilla URL
No response
Radar URL
No response
Description
This is a compatibility improvement to the Layout Instability API to align attribution rectangle reporting with other Web Platform APIs.
Current behavior: The LayoutShiftAttribution interface reports previousRect and currentRect values in device pixels.
Proposed change: Report these rectangles in CSS pixels instead, consistent with getBoundingClientRect(), IntersectionObserver, and ResizeObserver.
Rationale:
- Device pixels cause inconsistencies across different device pixel ratios
- Developers need to correlate layout shift measurements with other DOM measurements which use CSS pixels
- CSS pixels are the standard coordinate system for web content
Status: This feature is currently behind a flag in Chrome. We are seeking vendor feedback before broader enablement.
Impact: This is a minimal breaking change as the API has limited adoption while behind a flag.
Implementation: Chromium bug
ChromeStatus: https://chromestatus.com/feature/5155103518228480