
UnNot removes :not
selectors while preserving other selectors. This can be useful for outputting CSS for old browsers like Internet Explorer 8.
/* before */ /* after */
Usage
Add UnNot to your build tool:
npm install postcss-unnot --save-dev
Node
/* options */ ;
PostCSS
Add PostCSS to your build tool:
npm install postcss --save-dev
Load UnNot as a PostCSS plugin:
;
Gulp
Add Gulp PostCSS to your build tool:
npm install gulp-postcss --save-dev
Enable UnNot within your Gulpfile:
var postcss = ; gulp;
Grunt
Add Grunt PostCSS to your build tool:
npm install grunt-postcss --save-dev
Enable UnNot within your Gruntfile:
grunt; grunt;
Options
method
Type: String
Default: 'remove'
remove
Remove any selectors with :not
functions.
/* before */ /* after */
move
Move any selectors with :not
functions into a cloned rule.
/* before */ /* after */
pseudo
Remove only the :not
functions from selectors.
/* before */ /* after */
warn
Warn when a :not
function is used.