Skip to content

Request for position: Layout Instability API CSS pixel attribution #582

@anediaz

Description

@anediaz

Information about the proposal

Summary

The Layout Instability API currently reports attribution rectangles (prevRect and currentRect) in device pixels. This proposal changes them to CSS pixels for consistency with other Web Platform APIs (e.g., getBoundingClientRect, IntersectionObserver, ResizeObserver).

Key changes:

  • prevRect and currentRect now use CSS pixels instead of device pixels
  • Aligns with standard coordinate space used across the web platform
  • Improves consistency for developers measuring layout stability
  • Minimal breaking change (primarily affects telemetry/monitoring tools)

Motivation:

Device pixels create inconsistencies across different device pixel ratios and make it harder for developers to correlate layout shift data with other measurements. CSS pixels are the standard coordinate system for web content.

Compatibility:

This is behind a flag in Chrome. We're seeking feedback from other vendors before enabling by default.

We'd appreciate WebKit's position on this compatibility improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions