Le 09/10/2013 02:06, Alex Bell a écrit : > 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. Hi, Before we can discuss whether this is a good idea or if there is a better solution, please provide a well-defined proposal. What exactly is "user zoom"? If it’s a ratio, between what and what? Note that there are many related concepts here: initial and actual viewport, device pixels and CSS px, etc. http://dev.w3.org/csswg/css-device-adapt/#initial-viewport http://dev.w3.org/csswg/css-device-adapt/#actual-viewport -- Simon SapinReceived on Wednesday, 9 October 2013 13:12:11 UTC
This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:33 UTC