O'Reilly logo

Learning Modernizr by Adam Watson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Respond

As I previously mentioned, Modernizr used to be bundled with Respond.js, however recently as of version 2.5 it was decoupled from the library itself and must now be downloaded separately and then added manually. This was due to some IE 8 crashing issues.

Because it has been removed, I won't go into a lot of detail about it beyond implementing and lightly reviewing the example from the Respond JS download website and showing how to load it as a polyfill with Modernizr.load.

On the Respond JS Github page, this bit of JavaScript describes itself as follows:

A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more).

This means if you wanted media queries regarding this scope to be backward compatible you could leverage ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required