Try any Node.js package right in your browser

Share this code:

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including siphon-media-query with all npm packages installed. Try it out:

siphon-media-query v1.0.0

Extract media query-specific rules from CSS

siphon-media-query

Extract media query-specific CSS from a stylesheet. Used by the Foundation for Emails web inliner to separate general CSS from media query-specific CSS. Inspired by media-query-extractor, the main difference being this library works as a pure API.

Installation

npm install siphon-media-query --save

Usage

The parse function takes in a CSS string and gives you back a CSS string.