# postcss-apply-class

> PostCSS plugin to apply CSS classes in a similar fashion to LESS

Latest version **0.1.6** (published 2017-10-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-apply-class
pnpm add postcss-apply-class
yarn add postcss-apply-class
bun add postcss-apply-class
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2017-10-17 |
| First published | 2017-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jason Walton |
| Maintainers | jwalton512 |
| Keywords | postcss, css |

## Links

- npm: https://www.npmjs.com/package/postcss-apply-class
- Repository: https://github.com/jwalton512/postcss-apply-class
- Issues: https://github.com/jwalton512/postcss-apply-class/issues
- npm.io page: https://npm.io/package/postcss-apply-class

## Dependencies (1)

- [postcss](https://npm.io/package/postcss.md) ^6.0.1

## 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

- 0.1.6 (latest) — 2017-10-17
- 0.1.5 — 2017-10-17
- 0.1.4 — 2017-10-16
- 0.1.3 — 2017-10-16
- 0.1.2 — 2017-10-08
- 0.1.1 — 2017-10-07
- 0.1.0 — 2017-10-07

## README

# PostCSS Apply Class [![Build Status][ci-img]][ci]

[PostCSS] plugin to apply CSS classes in a similar fashion to LESS.

[PostCSS]: https://github.com/postcss/postcss
[ci-img]:  https://travis-ci.org/jwalton512/postcss-apply-class.svg
[ci]:      https://travis-ci.org/jwalton512/postcss-apply-class

Using this input.css:
```css
.bold {
    font-weight: bold;
}
.text-small {
    font-size: .75rem;
}
.foo {
    @apply .bold, .text-small;
}
```

you will get:
```css
.bold {
    font-weight: bold;
}
.text-small {
    font-size: .75rem;
}
.foo {
    font-weight: bold;
    font-size: .75rem;
}
```

## Usage

```js
postcss([ require('postcss-apply-class') ])
```

See [PostCSS] docs for examples for your environment.

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