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?

贡献者指南