mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
9.1k stars 22.45k forks source link

Include detailed information about scaling on window.devicePixelRatio reference page #29682

Open chrisdavidmills opened 10 months ago

chrisdavidmills commented 10 months ago

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

(this came up during a review of my Window Management API content PR: https://github.com/mdn/content/pull/28851)

Technically, the window.devicePixelRatio value also includes scaling of the window itself, i.e. page zoom (at least on Chrome and Firefox on Mac, but not on Safari desktop...), while screen.devicePixelRatio does not.

We probably ought to update the window.devicePixelRatio page at some point to mention this, provide details, and include appropriate compat data to show which browsers include page zoom and which don't.

What did you expect to see?

Clear, explicit information about the effects of browser zoom on the devicePixelRatio value. At the moment it is sort of mentioned in a roundabout way in the examples, but not clearly tackled.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

Josh-Cena commented 2 months ago

Seems related to https://bugs.webkit.org/show_bug.cgi?id=236232