0.0.2-1 • Published 9 years ago
node-match-media v0.0.2-1
node-match-media
Node function to extract styles matching certain media conditions, and separate the styles out
Usage
- grunt-match-media - a Grunt wrapper for this task, allowing you to use it as part of the build process.
Future uses
- gulp-match-media - I plan on making a wrapper for the popular build-tool Gulp
- command line interface - extending this package so it can be run directly from the command line, or as a task to run from npm
Caveats / Todos
At the moment, functionality is limited to min-width
, max-width
, min-device-width
, max-device-width
, min-height
, max-height
, min-device-height
, max-device-height
, orientation
media queries, chaining is supported with ,
and and
to build complex statements. I have also recently added support for a binary check between print
and all other media types. In the future I am looking to include:
- Possibility to include more queries such as
min-device-pixel-ratio
hopefully working through this list: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Mediaqueries#Pseudo-BNF(for_those_of_you_that_like_that_kind_of_thing) - An exclude option to ignore a certain type of media query