Skip to content

polyfills/custom-media

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

custom-media

NPM version Build status Test coverage Dependency Status License Downloads Gittip

A pure regexp-replace polyfill for W3C CSS Custom Media queries. This is basically CSS variables, but for media queries.

This:

@custom-media --full-page (max-width: 980px);

@media (--full-page) {

}

Becomes:

@custom-media --full-page (max-width: 980px);

@media (max-width: 980px) {

}

Usage

var customMedia = require('custom-media')
css = customMedia(css)