/styled-normalize

global normalize.css for styled-components

Primary LanguageJavaScriptMIT LicenseMIT

styled-normalize

Normalize file for styled-components CSS-in-JS library.

The original normalize.css is pulled from necolas/normalize.css, and parsed into styled ready format.

Usage

npm install --save styled-normalize

JavaScript

// ----- styles/index.js
import styledNormalize from 'styled-normalize'
import { injectGlobal } from 'styled-components'

injectGlobal`
  ${styledNormalize}

  // You can continue writing global styles
  body {
    padding: 0;
    background-color: black;
  }
`

You can also use named imports:

// ES Modules
import { normalize, version } from 'styled-normalize'

// CommonJS
const { normalize, version } = require('styled-normalize')

assert(version)

License

The MIT License