#126: Using Modernizr

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Should Modernizr be part of every modern web project? Not necessarily. In this screencast I talk about how you need Modernizr when you plan to do something specifically different depending on its browser support determination.

Load scripts to support a feature when the browser lacks native support? Perfect.

Test if browser supports gradients before applying them? Probably not needed unless you need to do something very specifically different than your standard flat color fallback.

We look at an example where a box-shadow is important enough to our design that we need to test for it and do something different if we determine lack of support. Testing for SVG support and dealing with fallbacks is also a good use case. We also look at a simple scenario where a geolocation test probably wouldn’t do us much good.