🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

styled-reset

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styled-reset

Eric Meyer's Reset CSS for styled-components

4.3.4
Source
npm
Version published
Weekly downloads
53K
5.3%
Maintainers
1
Weekly downloads
 
Created
Source

styled-reset

npm version CircleCI Patreon Backers on Open Collective Sponsors on Open Collective ko-fi Support with PayPal

Eric Meyer's 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).

If you're on styled-components 3.x, please npm i styled-reset@1.7.1.

Usage:

Styled Components 4.x || 5.x

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

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

You can also use the default export or named export (lowercase) in your own global style:

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

Styled Components 3.x

If you're using Styled Components version 3.x or 2.x, you'll need to use the injectGlobal api instead (and install styled-reset@1.7.1):

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]

LICENSE

Keywords

css

FAQs

Package last updated on 26 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts