Domanda

The question is basically in the title: will the modernizr build tool include respond.js and/or matchmedia.js when I select media queries to be included (under extra)?

Or do I have to include it manually with Modernizr.load? (I've looked at the source, but I can't really tell whether respond.js is in there)

È stato utile?

Soluzione

If you select the "Media Queries" option under "Extra" in the build tool, your Modernizr build will include a matchmedia.js-like function called Modernizr.mq() (see the documentation). The code's basically the same as matchmedia as both were written by Paul Irish.

Respond.js isn't included in Modernizr, but Initializr can create an HTML5 Boilerplate build which includes Modernizr and Respond.js.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top