W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Fwd: CSSOM & browser scaling / zoom

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 29 Sep 2009 14:30:07 +0200
To: "CSS WG" <www-style@w3.org>
Message-ID: <op.u00qchkx64w2qv@annevk-t60>
Forwarding this piece of feedback on behalf of Jake. I think this is  
already clear in the CSSOM View draft, but it does not hurt to check again.

------- Forwarded message -------
From: "Jake Archibald" <jaffathecake@gmail.com>
To: annevk@opera.com
Subject: CSSOM & browser scaling / zoom
Date: Tue, 29 Sep 2009 13:41:26 +0200


I tried to post this to www-style, but it didn't make it for one
reason or another:

The specification doesn't mention scaling / zooming performed by
various modern browsers, I think it should as it's an area throwing up
a lot of inconsistencies.

A "zoom" feature is present in modern versions of all the major
browsers, but it's also common for mobile devices eg iphone & Opera

The desktop browsers seem to agree that element sizes are returned as
their pixel size before scaling (although getBoundingClientRect
doesn't in some cases), but I think this should be written into the

One inconsistency is in measuring the window size. Eg, Webkit gives
(screenPixels / zoom), meaning the reported window size shrinks as the
zoom is increased. Firefox on the other hand gives actualWindowSize
(although I'm told it behaves like Webkit on a mac).

I'm not sure what the standard should be, but there should be one.
Perhaps Firefox is right as the document is zoomed rather than the
window, so values attached to window should be agnostic of zoom.

Values attached to document should report pixels as (screenPixels / zoom).

Obviously this wouldn't apply to zooming that only affects font-size


Anne van Kesteren
Received on Tuesday, 29 September 2009 12:30:46 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:39 UTC