npm

npm’s 2019 JavaScript ecosystem survey analysis is now available!Get your copy here »

react-style-reset

1.2.6 • Public • Published

react-style-reset

CircleCI version code size dependencies devDependencies

An object-style CSS Reset for React.

Features

This module includes Eric Meyer's Reset CSS 2.0 written as "object styles", to be easily used with styled-component and emotion. Also included is a template literal version.

Also included is the popular Normalize.css, a modern HTML5-ready alternative to CSS resets, in both object and template literal versions.

Usage

Reset.css

With object styles:

import reset from 'react-style-reset';
import { injectGlobal } from 'emotion';
 
injectGlobal(reset, {
  ...
});

With template literal styles:

import reset from 'react-style-reset/string';
import { createGlobalStyle } from 'styled-components';
 
const GlobalStyles = createGlobalStyle`
  ${reset};
 
  ...
`;

Normalize.css

With object styles:

import { normalize } from 'react-style-reset';
import { injectGlobal } from 'emotion';
 
injectGlobal(normalize, {
  ...
});

With template literal styles:

import { normalize } from 'react-style-reset/string';
import { createGlobalStyle } from 'styled-components';
 
const GlobalStyles = createGlobalStyle`
  ${normalize};
 
  ...
`;

Credits

Eric Meyer http://meyerweb.com/eric/tools/css/reset/ License: none (public domain)

normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css

License

MIT — see LICENCE

install

npm i react-style-reset

Downloadsweekly downloads

455

version

1.2.6

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability