1.1.1 • Published 4 years ago

normalize.cssinjs v1.1.1

Weekly downloads
386
License
MIT
Repository
github
Last release
4 years ago

normalize.cssinjs

travis build codecov coverage version downloads MIT License

Normalize.css in CSS-in-JS format - when you don't wan't to inject global. Uses other my library css-in-to-js.

Usage

yarn add normalize.cssinjs
OR
npm install --save normalize.cssinjs
import resets from 'normalize.cssinjs';

Settings

normalize

By default it uses CSStools Normalize.css but you can provide your selected with:

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:

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 for parsing the CSS.

normalize.css is a project by Jonathan Neal, co-created with Nicolas Gallagher.

1.1.1

4 years ago

1.1.0

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago