[mediaqueries4] zoom-ratio as a media feature

Hello,

Current developer efforts to reliably measure user zoom are basically  
a shambles. There are dozens of different techniques, none of which  
are truly comprehensive cross-browser. The most encyclopedic of all  
approaches, the maniacally detailed 'detect-zoom' has been badly  
broken on the desktop by recent changes to FF18 and Chrome 27. FF 18+  
now change the 'devicePixelRatio' value on manual zoom (cmd/ctrl +/-),  
arguably distorting the meaning of the word 'device'. On Chrome,  
webkitTextSizeAdjust was deprecated on the desktop, the only  
bulletproof method. For the whole convoluted story see:

https://github.com/tombigel/detect-zoom

One of the things that seems to trip up all discussion of this is that  
some code bases tie zoom to resolution, while others do not.  
Everybody's doing it their own way. This is an area that is just  
screaming for standardization.

I realize I am probably wading into a few long-standing debates here,  
but IMHO user zoom should be queryable through window.matchMedia. The  
property could be called 'zoom-ratio', to make it absolutely clear  
that it's a ratio, and it should accept min/max prefixes. I propose  
that this be added to Media Queries Level 4.

If I'm late to the discussion, or just totally wrong, I would really  
appreciate a nice clear explanation of why this is impossible, or a  
bad idea.

Thanks for all your hard work,
Alex

Received on Wednesday, 9 October 2013 11:52:10 UTC