w3c/csswg-drafts

[cssom-view] Should browser zoom affect screen.width?

Open

#399 建立於 2016年8月11日

在 GitHub 查看
 (9 留言) (0 反應) (0 負責人)HTML (545 fork)batch import
Help Wantedcssom-view-1

倉庫指標

Star
 (3,546 star)
PR 合併指標
 (平均合併 87天 7小時) (30 天內合併 24 個 PR)

描述

In Firefox and IE/Edge, the browser's zoom level affects screen.width (so that as you increase the zoom, the reported value of screen.width decreases). In Chrome and Safari, it does not.

The spec says:

The width attribute must return the width of the output device, in CSS pixels.

My reading of this is that, since it says "in CSS pixels", Firefox and IE/Edge's behaviour is correct (since zooming in decreases the number of CSS pixels that fit onto the screen).

Due to the implementation divergence, I'd like to double check: is this the intended interpretation?

貢獻者指南