postcss-selector-not
PostCSS plugin to transform :not() W3C CSS level 4 pseudo class to :not() CSS level 3 selectors
Last updated 2 years ago by alaguna .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install postcss-selector-not 
SYNC missed versions from official npm registry.

PostCSS Selector Not PostCSS Logo

npm version CSS Standard Status Build Status Discord

PostCSS Selector Not transforms :not() W3C CSS level 4 pseudo classes to :not() CSS level 3 selectors following the Selectors 4 Specification.

p:not(:first-child, .special) {
	color: red;
}

/* becomes */

p:not(:first-child):not(.special) {
	color: red;
}

⚠️ Only lists of simple selectors (:not(.a, .b)) will work as expected. Complex selectors (:not(.a > .b, .c ~ .d)) can not be downgraded.

Usage

Add PostCSS Selector Not to your project:

npm install postcss postcss-selector-not --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssSelectorNot = require('postcss-selector-not');

postcss([
	postcssSelectorNot(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

PostCSS Selector Not runs in all Node environments, with special instructions for:

Current Tags

  • 7.0.1                                ...           latest (2 years ago)

16 Versions

  • 7.0.1                                ...           2 years ago
  • 7.0.0                                ...           2 years ago
  • 6.0.1                                ...           2 years ago
  • 6.0.0                                ...           3 years ago
  • 5.0.0                                ...           4 years ago
  • 4.0.1                                ...           4 years ago
  • 4.0.0                                ...           6 years ago
  • 3.0.1                                ...           8 years ago
  • 3.0.0                                ...           8 years ago
  • 2.0.0                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |