# simplestyle-js-plugin-postcss

> PostCSS integration with simplestyle-js to provide helpful utility and additional features to the zero-dependency simplestyle base

Latest version **2.0.0** (published 2020-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install simplestyle-js-plugin-postcss
pnpm add simplestyle-js-plugin-postcss
yarn add simplestyle-js-plugin-postcss
bun add simplestyle-js-plugin-postcss
```

## 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 | 2020-04-05 |
| First published | 2019-12-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Benjamin Duran |
| Maintainers | stratodyne |
| Keywords | CSS-in-JS, CSS, Style, Styled, Simple, Plugin, PostCSS, Autoprefixer |

## Links

- npm: https://www.npmjs.com/package/simplestyle-js-plugin-postcss
- Repository: https://github.com/benduran/simplestyle-plugin-postcss
- Homepage: https://github.com/benduran/simplestyle-plugin-postcss#readme
- Issues: https://github.com/benduran/simplestyle-plugin-postcss/issues
- npm.io page: https://npm.io/package/simplestyle-js-plugin-postcss

## Dependencies (3)

- [postcss](https://npm.io/package/postcss.md) ^7.0.27
- [simplestyle-js](https://npm.io/package/simplestyle-js.md) ^2.0.0
- [@types/autoprefixer](https://npm.io/package/@types/autoprefixer.md) ^9.7.2

## 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) — 2020-04-05
- 0.1.0 — 2019-12-06

## README

# simplestyle-js-plugin-postcss [![Build Status](https://travis-ci.org/benduran/simplestyle-plugin-postcss.svg?branch=master)](https://travis-ci.org/benduran/simplestyle-plugin-postcss)
A [simplestyle-js](https://github.com/benduran/simplestyle-plugin-postcss) **posthook** plugin for transforming the CSS generated by `simplestyle-js` with PostCSS and PostCSS plugins

## Installation
`npm install simplestyle-js-plugin-postcss --save`

## Usage
```
import { createStyles, registerPostHook } from 'simplestyle-js';
import simplestylePostCSSPlugin from 'simplestyle-js-plugin-postcss';

registerPostHook(simplestylePostCSSPlugin(
  [ /* Array of PostCSS plugins, like autoprefixer, cssnano, etc */ ],
  { /* postcss process options (optional) */ },
);
const styles = createStyles({
  myButton: {
    '&:hover': {
      backgroundColor: 'red',
    },
    '&:active, &:focus': {
      borderColor: 'blue',
    },
    backgroundColor: 'black',
    border: '1px solid',
    boxSizing: 'border-box',
    color: 'white',
  },
});
const btn = document.createElement('button');
btn.classList.add(styles.myButton); // button will have styles that were transformed with PostCSS
document.body.appendChild(btn);
```

## License
[MIT](https://en.wikipedia.org/wiki/MIT_License)

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