2.0.0 • Published 7 years ago

match-media-range v2.0.0

Weekly downloads
26
License
CC0-1.0
Repository
github
Last release
7 years ago

match-media-range

NPM Version Build Status Tweet About This

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-dev

Import match-media-range as a resource.

import matchMedia from 'match-media-range';

match-media-range is 327 bytes when ES5 transpiled, minified, and gzipped.