Skip to content

Instantly share code, notes, and snippets.

@georgecrawford
Last active December 8, 2017 21:22
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save georgecrawford/acb44cae777f5d0378d1db001acefacd to your computer and use it in GitHub Desktop.
Save georgecrawford/acb44cae777f5d0378d1db001acefacd to your computer and use it in GitHub Desktop.
description: "PostCSS plugin to remove any `!important` declarations from all rules"
import * as postcss from 'postcss';
module.exports = postcss.plugin('postcss-remove-important', (options = {}) => {
return css => {
css.walkDecls(decl => {
decl.important = false;
});
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment