# postcss-expand-selectors

> PostCSS plugin expand comma separated selectors into individual rules

Latest version **2.0.0** (published 2023-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-expand-selectors
pnpm add postcss-expand-selectors
yarn add postcss-expand-selectors
bun add postcss-expand-selectors
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-06-16 |
| First published | 2023-06-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andor |
| Maintainers | sweetchuck |
| Keywords | postcss, css, postcss-plugin, unused |

## Links

- npm: https://www.npmjs.com/package/postcss-expand-selectors
- Repository: https://github.com/Sweetchuck/npm-postcss-expand-selectors
- Issues: https://github.com/Sweetchuck/npm-postcss-expand-selectors/issues
- npm.io page: https://npm.io/package/postcss-expand-selectors

## 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) — 2023-06-16
- 0.1.1 — 2023-06-16

## README

# PostCSS Expand Selectors

[![CircleCI](https://circleci.com/gh/Sweetchuck/npm-postcss-expand-selectors/tree/2.x.svg?style=svg)](https://circleci.com/gh/Sweetchuck/npm-postcss-expand-selectors/?branch=2.x)
[![codecov](https://codecov.io/gh/Sweetchuck/npm-postcss-expand-selectors/branch/2.x/graph/badge.svg?token=HSF16OGPyr)](https://app.codecov.io/gh/Sweetchuck/npm-postcss-expand-selectors/branch/2.x)


[PostCSS] plugin to expand comma separated selectors into individual rules.

**SCSS source**
```scss
a {
  e: f;
}

b,
c {
  g: h;
}

d {
  i: j;
}
```

Compile the SCSS files with these options: `{ sourceComments: true, outputStyle: 'expanded' }`

**CSS before**
```css
a {
  e: f;
}

/* line 4, style.css */
b,
c {
  g: h;
}

d {
  i: j;
}
```


## Usage

```javascript
postcss([ require('postcss-expand-selectors') ])
```


**CSS after**
```css
a {
  e: f;
}

/* line 4, style.css */
b {
  g: h;
}

/* line 4, style.css */
c {
  g: h;
}

d {
  i: j;
}
```


## When to use this plugin

If there are no comma separated selectors in a rule then you can get a
more accurate CSS coverage report from Google Chrome with Puppeteer.

So use this plugin only when you prepare your application for CSS coverage
generation with Google Chrome, but do not use this plugin when you create
production release.

[PostCSS]: https://postcss.org/

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