8.0.0 • Published 7 years ago

stringified-normalize v8.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

stringified-normalize

Stringified normalize.css for CSS-in-JS libraries

Necolas excellent normalize.css parsed into a JavaScript template literal, ready to be used by modern CSS-in-JS libraries such as styled-components or emotion.

Install

npm install --save stringified-normalize

Usage

Example uses styled-components, but works the same with other libraries, such as emotion. Simply replace the import statement appropriately.

import normalize from 'stringified-normalize';
import { injectGlobal } from 'styled-components';

injectGlobal`
  ${normalize}

  body {
    font-family: sans-serif;
  }
`;

Development

The update script will automatically download the latest published normalize.css and parse it, compare to the current version and generate an updated version if any changes are detected.

Simply run npm start to check for updates.

git clone https://github.com/gabbes/stringified-normalize
cd stringified-normalize

npm start

License

MIT