# minify-css-string

> Remove new lines and extra space from a string of css.

Latest version **1.0.0** (published 2016-07-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install minify-css-string
pnpm add minify-css-string
yarn add minify-css-string
bun add minify-css-string
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-07-12 |
| First published | 2016-07-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Benjamin Tatum |
| Maintainers | bentatum |
| Keywords | css, inline, minify, string |

## Links

- npm: https://www.npmjs.com/package/minify-css-string
- Repository: https://github.com/bentatum/minify-css-string
- Issues: https://github.com/bentatum/minify-css-string/issues
- npm.io page: https://npm.io/package/minify-css-string

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

- 1.0.0 (latest) — 2016-07-12

## README

# minify-css-string

[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![standard][standard-image]][standard-url]

[npm-image]: https://img.shields.io/npm/v/minify-css-string.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/minify-css-string
[travis-image]: https://img.shields.io/travis/bentatum/minify-css-string.svg?style=flat-square
[travis-url]: https://travis-ci.org/bentatum/minify-css-string
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard

Remove new lines and extra space from a string of css.

## Install

```
npm i minify-css-string
```

## Usage

```js
import { default as minifyCssString } from 'minify-css-string'

const cssString = `
  @-webkit-keyframes react-fade-in {
    0%   { opacity: 0; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
  }

  @-moz-keyframes react-fade-in {
    0%   { opacity: 0; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
  }

  @-ms-keyframes react-fade-in {
    0%   { opacity: 0; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
  }

  @keyframes react-fade-in {
    0%   { opacity: 0; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
  }
`

<style>
  {minifyCssString(cssString)}
</style>

/* minifyCssString(cssString) === `@-webkit-keyframes react-fade-in { 0% { opacity: 0; } 50% { opacity: 0; } 100% { opacity: 1; } } @-moz-keyframes react-fade-in { 0% { opacity: 0; } 50% { opacity: 0; } 100% { opacity: 1; } } @-ms-keyframes react-fade-in { 0% { opacity: 0; } 50% { opacity: 0; } 100% { opacity: 1; } } @keyframes react-fade-in { 0% { opacity: 0; } 50% { opacity: 0; } 100% { opacity: 1; } }` */
```

## Contributing

Contributions welcome! Please read the [contributing guidelines](CONTRIBUTING.md) first.

## License

[ISC](LICENSE.md)

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