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.
npm install --save styled-normalize
// ----- 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)
The MIT License