# normalize.cssinjs

> Normalize.css in CSS-in-JS format

Latest version **1.1.1** (published 2019-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install normalize.cssinjs
pnpm add normalize.cssinjs
yarn add normalize.cssinjs
bun add normalize.cssinjs
```

## 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 | 1.1.1 |
| Published | 2019-12-30 |
| First published | 2018-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 16.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Joonas Kallunki |
| Maintainers | j-kallunki |
| Keywords | normalize, css, reset, cssinjs |

## Links

- npm: https://www.npmjs.com/package/normalize.cssinjs
- Repository: https://github.com/J-Kallunki/normalize.cssinjs
- Homepage: https://github.com/J-Kallunki/normalize.cssinjs#readme
- Issues: https://github.com/J-Kallunki/normalize.cssinjs/issues
- npm.io page: https://npm.io/package/normalize.cssinjs

## Dependencies (2)

- [@csstools/normalize.css](https://npm.io/package/@csstools/normalize.css.md) 10.1.0
- [@j-kallunki/css-in-to-js](https://npm.io/package/@j-kallunki/css-in-to-js.md) 1.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

- 1.1.1 (latest) — 2019-12-30
- 1.1.0 — 2019-08-22
- 1.0.7 — 2019-08-21
- 1.0.6 — 2019-02-05
- 1.0.5 — 2019-02-04
- 1.0.4 — 2018-12-05
- 1.0.3 — 2018-12-05
- 1.0.2 — 2018-12-05
- 1.0.1 — 2018-11-15
- 1.0.0 — 2018-11-14

## README

# normalize.cssinjs

[![travis build](https://img.shields.io/travis/J-Kallunki/normalize.cssinjs.svg?style=flat-square)](https://travis-ci.org/J-Kallunki/normalize.cssinjs)
[![codecov coverage](https://img.shields.io/codecov/c/github/J-Kallunki/normalize.cssinjs.svg?style=flat-square)](https://codecov.io/github/J-Kallunki/normalize.cssinjs)
[![version](https://img.shields.io/npm/v/normalize.cssinjs.svg?style=flat-square)](http://npm.im/normalize.cssinjs)
[![downloads](https://img.shields.io/npm/dm/normalize.cssinjs.svg?style=flat-square)](http://npm-stat.com/charts.html?package=normalize.cssinjs&from=2015-08-01)
[![MIT License](https://img.shields.io/npm/l/normalize.cssinjs.svg?style=flat-square)](http://opensource.org/licenses/MIT)

Normalize.css in CSS-in-JS format - when you don't wan't to inject global. Uses other my library [css-in-to-js](https://github.com/J-Kallunki/css-in-to-js).

## Usage

```bash
yarn add normalize.cssinjs
OR
npm install --save normalize.cssinjs
```

```bash
import resets from 'normalize.cssinjs';
```

## Settings

### `normalize`

By default it uses [CSStools Normalize.css](https://github.com/csstools/normalize.css/) but you can provide your selected with:

```javascript
import { normalizeCssInJs } from 'normalize.cssinjs';
import cssString from '!raw-loader!normalize.css';
const resets = normalizeCssInJs({ normalize: cssString });
```

(or use something like babel-plugin-inline-import)

### `cssToString`

If you wan't to get CSS-declarations in CSS-string format use:

```javascript
const resets = normalizeCssInJs({ cssToString: true });
```

## Tools

### `minifyCss()`

Minify CSS-string

### `cssToJs(cssString, { cssToString: false })`

Convert any CSS-string to styled-format object or object with CSS-declarations as string.

### `resetWithSelectors(resets)(selectors)`

Return resets (CSS) for selector or array of selectors.

## Acknowledgements

Uses [PostCSS](https://github.com/postcss/postcss) for parsing the CSS.

normalize.css is a project by [Jonathan Neal](https://github.com/jonathantneal), co-created with [Nicolas Gallagher](https://github.com/necolas).

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