# postcss-remove-classes

> PostCSS plugin to remove specific classes from a CSS file

Latest version **2.0.0** (published 2021-11-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install postcss-remove-classes
pnpm add postcss-remove-classes
yarn add postcss-remove-classes
bun add postcss-remove-classes
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-11-15 |
| First published | 2016-04-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Maintainers | jacobp100 |
| Keywords | postcss, css, minify, min, class, className |

## Links

- npm: https://www.npmjs.com/package/postcss-remove-classes
- Repository: https://github.com/jacobp100/postcss-remove-classes
- Homepage: https://github.com/jacobp100/postcss-remove-classes#readme
- Issues: https://github.com/jacobp100/postcss-remove-classes/issues
- npm.io page: https://npm.io/package/postcss-remove-classes

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [postcss-selector-parser](https://npm.io/package/postcss-selector-parser.md) ^6.0.6

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2021-11-15
- 1.0.4 — 2017-01-18
- 1.0.3 — 2017-01-18
- 1.0.2 — 2016-06-15
- 1.0.1 — 2016-05-07
- 1.0.0 — 2016-05-06
- 0.0.3 — 2016-04-17
- 0.0.2 — 2016-04-17
- 0.0.1 — 2016-04-17

## README

# postcss-remove-classes

Removes all instances of one or more class selectors from a CSS file. Accepts one argument that specifies which class names must be removed. This must be a single string, an array of strings, or a RegExp instance.

```bash
npm i --save-dev postcss-remove-classes
```

```js
postcss()
  .use(plugin(['remove'])) // Add as many as you like
  .process('.remove {} .keep {}').css // Gives .keep {}
```

# Examples
```css
a:matches(.remove) /* empty */
a:matches(.remove, .keep) /* a:matches(.keep) */
a:not(.remove) /* a */
a:not(.remove, .keep) /* a:not(.keep) */
a[class="remove"] /* a[class="remove"] --- Will not look in attributes */
```

---
_Source: https://npm.io/package/postcss-remove-classes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
