- From: Timur Mehrvarz <timur.mehrvarz@web.de>
- Date: Wed, 29 Aug 2007 02:13:03 +0200
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: www-style@w3.org
On 28.08.2007, at 23:50, fantasai wrote: > Media Queries shall not include any normative requirements on re- > evaluating > media queries in responses to changes in the environment, but > shall include > a note explaining that a UA is expected to re-evaluate and re- > layout the page > in response to viewport resizing. Let's say, one UA does support aspect-ratio, but does not re-evaluate MQ's in response to aspect-ratio changes. In such a case, I may want to help myself, with code, similar to the one shown below. How do you expect this to play out on another agent, that actually _does_ re- evaluate (and possible re-layout) in response to aspect-ratio changes? This may well result in double rendering and flashing etc, no? It could be helpful, if script code had a way to find out, if "automatic- aspect-ratio-re-layout" was actually supported by the agent. Timur //////////////////////////////////////////////////////////////// // auto-reload on aspect ratio change var myWidth; var myHeight; function load() // my onLoad fkt. { myWidth = window.innerWidth; myHeight = window.innerHeight; } function resize() // my onResize fkt. { // if(!automatic-aspect-ratio-re-layout) if((myWidth>myHeight && window.innerWidth<window.innerHeight) || (myWidth<myHeight && window.innerWidth>window.innerHeight)) { myWidth = window.innerWidth; myHeight = window.innerHeight; location.reload(); } }
Received on Wednesday, 29 August 2007 00:13:43 UTC