Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

README.md 893 B

3 år sedan
1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 leve 4 pseudo class to :not() CSS level 3 selectors
  3. http://dev.w3.org/csswg/selectors-4/#negation
  4. ## Installation
  5. ```console
  6. $ npm install postcss-selector-not
  7. ```
  8. ## Usage
  9. ```js
  10. var postcss = require("postcss")
  11. var output = postcss()
  12. .use(require("postcss-selector-not"))
  13. .process(require("fs").readFileSync("input.css", "utf8"))
  14. .css
  15. ```
  16. Using this `input.css`:
  17. ```css
  18. p:not(:first-child, .special) {
  19. color: red;
  20. }
  21. ```
  22. you will get:
  23. ```css
  24. p:not(:first-child):not(.special) {
  25. color: red;
  26. }
  27. ```
  28. ---
  29. ## [Changelog](CHANGELOG.md)
  30. ## [License](LICENSE)