Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 1.81 KB

README.md

File metadata and controls

57 lines (43 loc) · 1.81 KB

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)