Re: [mediaqueries4] zoom-ratio as a media feature

Simon Pieters recently
added<http://lists.w3.org/Archives/Public/www-style/2013Oct/0472.html>
this
to the spec for
window.devicePixelRatio<http://dev.w3.org/csswg/cssom-view/#dom-window-devicepixelratio>.
It makes sense to make resolution/device-pixel-ratio MQs match this;
there's a bug for that<https://www.w3.org/Bugs/Public/show_bug.cgi?id=23548>
.

See also James Robinson's
suggestion<http://lists.w3.org/Archives/Public/www-style/2013Oct/0485.html>
that
we explicitly spec that window.devicePixelRatio (and the MQ equivalents)
change immediately before firing the resize event on window (no earlier, no
later), so that scripts never see inconsistent state.


On Sun, Nov 10, 2013 at 5:01 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Sat, Nov 9, 2013 at 6:41 AM, Florian Rivoal <florian@rivoal.net> wrote:
> > Following up on what we had discussed during the conf call, I think the
> > rough consensus was if we should do anything, it should be through the
> > existing resolution / device-pixel-ratio MQs, and that the different
> types
> > of zooms should not all have the same influence on them.
> >
> > - Pinch zoom on mobile browsers does not affect the geometry of the
> > viewport, and as they merely act as a magnifying glass, they should not
> > offer via media queries the ability to trigger layout changes, so no MQ
> > should change during this kind of zoom. The use case of serving high
> > resolution images when zoomed in can already be served by image-set() and
> > friends.
> >
> > - Zooms that just change the font size have no reason to affect the
> > resolution/device-pixel-ratio MQs
> >
> > - The desktop style of zoom which enlarges everything while keeping the
> > physical size of the window constant changes the geometry of the
> viewport,
> > which is reflected in the width and height MQ. This type of zoom should
> also
> > change the resolution / device-pixel-ratio.
> >
> > Do we want to put that in the spec, or do we prefer to leave zooming
> > undefined as has been historically the case in CSS? I believe that there
> is
> > value here in specifying this, even though we may want to be careful in
> the
> > phrasing to allow other types of zooming to emerge.
>
> We need to put it in *some* spec, and MQ is an appropriate place for it.
>
> I believe your characterization of the zoom as "affecting the geometry
> of the viewport" is fine.
>
> ~TJ
>
>

Received on Tuesday, 12 November 2013 15:36:00 UTC