Reset CSS for Styled Components
Clone or download
Latest commit 0345956 Dec 5, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Add a bunch of stuff Oct 10, 2018
flow-typed/npm Chore: deps Nov 21, 2018
src Add a bunch of stuff Oct 10, 2018
.babelrc Add a bunch of stuff Oct 10, 2018
.editorconfig first Jul 11, 2017
.eslintrc.json Chore: deps. Apr 22, 2018
.flowconfig Add a bunch of stuff Oct 10, 2018
.gitattributes first Jul 11, 2017
.gitignore Don't check in lib Feb 20, 2018
.npmrc Only publish relevant files Jul 11, 2017
LICENSE.md Fix license in package.json Jan 21, 2018
README.md Maybe fix readme Oct 10, 2018
index.d.ts Add typescript support and named export Mar 18, 2018
package-lock.json 1.6.2 Dec 5, 2018
package.json 1.6.2 Dec 5, 2018

README.md

styled-reset

npm version CircleCI

reset.css for styled-components.

Also see styled-normalize from Sergey Sova.


Installation:

npm i styled-reset (use the -S flag if you're on npm 4 or earlier).

Usage:

import * as React from 'react'
import { createGlobalStyle } from 'styled-components'
import reset from 'styled-reset'

const GlobalStyle = createGlobalStyle`
  ${reset}
  /* other styles */
`

const App = () => (
  <React.Fragment>
    <GlobalStyle />
    <div>Hi, I'm an app!</div>
  </React.Fragment>
}

export default App

If you're using Styled Components version 3.x or 2.x, you'll need to use the injectGlobal api instead:

import { injectGlobal } from 'styled-components'
import reset from 'styled-reset'
injectGlobal`
  ${reset}
`

reset is also available as a named export:

import { reset } from 'styled-reset'

Credits

All credit goes to Eric Meyer for reset.css.

reset.css is public domain (unlicensed).

License:

MIT