Features
- Allows HTML5/CSS3 Feature detection.
- Custom build for the library available.
- Yepnope.js allows fallback to polyfills.
- Retrieve prefixed/non-prefixed CSS properties
<html class="no-js>
Gets Replaced with below at runtime:
<html class="js flexboxlegacy canvas canvastext webgl no-touch geolocation rgba backgroundsize borderimage borderradius boxshadow textshadow cssanimations csstransforms csstransitions fontface audio svg inlinesvg smil svgclippaths" lang="en">
Usage in JS:
<script>
var animationsSupported = Modernizr.cssanimations;
</script>
When to use Modernizr?
- Almost everytime you want to detect features.
- For graceful degradation.
- Limiting behavior across browsers.