Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/csstools/postcss-selector-not

PostCSS plugin to transform :not() W3C CSS level 4 pseudo class to more compatible CSS (multiple css3 :not() selectors)
https://github.com/csstools/postcss-selector-not

javascript postcss postcss-plugins

Last synced: about 1 month ago
JSON representation

PostCSS plugin to transform :not() W3C CSS level 4 pseudo class to more compatible CSS (multiple css3 :not() selectors)

Awesome Lists containing this project

README

        

⚠️ PostCSS Selector Not was moved to @csstools/postcss-plugins. ⚠️

Read the announcement

# postcss-selector-not [![CSS Standard Status](https://cssdb.org/images/badges/not-pseudo-class.svg)](https://cssdb.org/#not-pseudo-class) [build status][cli-url]

> PostCSS plugin to transform `:not()` W3C CSS level 4 pseudo class to :not() CSS level 3 selectors

http://dev.w3.org/csswg/selectors-4/#negation

[!['Can I use' table](https://caniuse.bitsofco.de/image/css-not-sel-list.png)](https://caniuse.com/#feat=css-not-sel-list)

## Installation

```console
$ npm install postcss postcss-selector-not
```

## Usage

Using this `input.css`:

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

you will get:

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

---

## [Changelog](CHANGELOG.md)

## [License](LICENSE)

[cli-url]: https://github.com/postcss/postcss-selector-not/actions/workflows/test.yml?query=workflow/test