Created
May 14, 2017 14:21
-
-
Save eddiesigner/cd2d404a40dcfb3703f5a905c819f942 to your computer and use it in GitHub Desktop.
PostCSS Simple Media Queries Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var postcss = require('postcss'); // Load PostCSS | |
var postcss_nested = require('postcss-nested'); // Load the postcss-nested plugin | |
var simple_media_queries = require('postcss-simple-media-queries'); // Load the postcss-simple-media-queries | |
var css = fs.readFileSync('input.css', 'utf8'); // Your stylesheet | |
var output = postcss([simple_media_queries, postcss_nested]) // The order is important because this plugin depends on nesting capabilities | |
.process(css) | |
.css; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment