Modernizr/Modernizr — Issue #455: MQ for detecting width
Author: dgibson666
Created: 2011-12-19 02:57:02+00:00
State: open

This is not so much a bug as a feature request. The MQ tests are great for testing screen size and conditionally loading assets - especially scripts. But the fact that Modernizr.mq() still returns 0 for media queries of any type on those browsers that don't support them (e.g. IE 8-) even after adding the support via respond.js inclusion limits this utility of the script in such instances. Since respond.js doesn't actually get the browser dimensions, is it possible to add a lightweight/cross browser bit to Modernizr to test the browser dimensions independent of the media query support? Using the html5boilerplate pattern where jQuery is not loaded until the end (or conditionally loaded), it would be useful to have this functionality in modernizr.