Skip to content

[css-zoom?] Zoom and CSSOM #9398

@emilio

Description

@emilio

Zoom has some interesting behavior for the CSSOM, since it undoes some of its effects, but only in some APIs.

The original zoom draft by @atanassov makes sense to me:

  • You want all getComputedStyle things to be unzoomed, because you want to preserve div.style.foo = getComputedStyle(div).foo round-tripping.
  • You might want some of the sizes to be unzoomed.
  • But you never want positions to be unzoomed, that makes no sense because the positions are meaningless if you cross a zoom boundary and you unzoom them.

However Blink and WebKit seem to unzoom in things like getBoundingClientRect, ResizeObserver rects, and so on. I don't think those make much sense for the same reason zooming positions doesn't make much sense.

My personal take is that, in general, the less APIs that account for zoom by unzooming, the better.

cc: #5623 @chrishtr @lilles @smfr @tabatkins @atanassov

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11y-trackerGroup bringing to attention of a11y, or tracked by the a11y Group but not needing response.css-viewport-1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions