web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1018 B

  1. # postcss-selector-not [![CSS Standard Status](https://cssdb.org/badge/not-pseudo-class.svg)](https://cssdb.org/#not-pseudo-class) [![Build Status](https://travis-ci.org/postcss/postcss-selector-not.svg?branch=master)](https://travis-ci.org/postcss/postcss-selector-not)
  2. > PostCSS plugin to transform `:not()` W3C CSS level 4 pseudo class to :not() CSS level 3 selectors
  3. http://dev.w3.org/csswg/selectors-4/#negation
  4. [!['Can I use' table](https://caniuse.bitsofco.de/image/css-not-sel-list.png)](https://caniuse.com/#feat=css-not-sel-list)
  5. ## Installation
  6. ```console
  7. $ npm install postcss-selector-not
  8. ```
  9. ## Usage
  10. ```js
  11. var postcss = require("postcss")
  12. var output = postcss()
  13. .use(require("postcss-selector-not"))
  14. .process(require("fs").readFileSync("input.css", "utf8"))
  15. .css
  16. ```
  17. Using this `input.css`:
  18. ```css
  19. p:not(:first-child, .special) {
  20. color: red;
  21. }
  22. ```
  23. you will get:
  24. ```css
  25. p:not(:first-child):not(.special) {
  26. color: red;
  27. }
  28. ```
  29. ---
  30. ## [Changelog](CHANGELOG.md)
  31. ## [License](LICENSE)