Skip to content

Instantly share code, notes, and snippets.

@hail2u
Created August 12, 2018 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hail2u/9bfc6a6e16d97860d8de9f3d9ff3c232 to your computer and use it in GitHub Desktop.
Save hail2u/9bfc6a6e16d97860d8de9f3d9ff3c232 to your computer and use it in GitHub Desktop.
const postcss = require("postcss");
module.exports = postcss.plugin("wrap-with-supports", () => css => {
const supports = postcss.parse("@supports(top:0){}");
css.each(n => {
supports.first.append(n);
});
css.append(supports);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment