w3c/csswg-drafts

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

Open

#399 ouverte le 11 août 2016

Voir sur GitHub
 (9 commentaires) (0 réactions) (0 assignés)HTML (545 forks)batch import
Help Wantedcssom-view-1

Métriques du dépôt

Stars
 (3 546 stars)
Métriques de merge PR
 (Merge moyen 87j 7h) (24 PRs mergées en 30 j)

Description

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?

Guide contributeur