Package Exports
- styled-reset
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (styled-reset) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
styled-reset
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).
Contributors
This project exists thanks to all the people who contribute.
Backers
Thank you to all our backers! 🙏 [Become a backer]
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]