2.0.0 • Published 8 years ago
match-media-range v2.0.0
match-media-range
match-media-range is a polyfill that lets you use media query ranges in
window.matchMedia, following the Media Queries Level 4 specification.
matchMedia('(20em < width < 50em)');Try it right now using CodePen
Usage
Add match-media-range to your build tool:
npm install match-media-range --save-devImport match-media-range as a resource.
import matchMedia from 'match-media-range';match-media-range is 327 bytes when ES5 transpiled, minified, and gzipped.