1.0.0 • Published 10 years ago

custom-media v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

custom-media

NPM version Latest tag 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')
var css = customMedia(css)