8.1.1 • Published 3 months ago

styled-normalize v8.1.1

Weekly downloads
70,220
License
MIT
Repository
github
Last release
3 months ago

styled-normalize

CSS-normalize library for styled-components.

The original normalize.css is pulled from necolas/normalize.css, and parsed into styled ready format.

Usage

npm install --save styled-normalize
yarn add styled-normalize

styled-components v4 / v5

Package exported normalize and Normalize. Normalize is a component with global styles. normalize is a css-normalize content to interpolate into styled component.

Use as component:

// index.js
import React from 'react'
import ReactDOM from 'react-dom'
import { Normalize } from 'styled-normalize'

import { App } from './app'

const Root = () => (
  <React.Fragment>
    <Normalize />
    <App />
  </React.Fragment>
)

ReactDOM.render(<Root />, document.querySelector('#root'))

Also you can use createGlobalStyle API:

// styles/index.js
import { createGlobalStyle } from 'styled-components'
import { normalize } from 'styled-normalize'

export const GlobalStyle = createGlobalStyle`
  ${normalize}

  // You can continue writing global styles here
  body {
    padding: 0;
    background-color: black;
  }
`

// index.js
import React from 'react'
import ReactDOM from 'react-dom'

import { GlobalStyle } from './styles'
import { App } from './app'

const Root = () => (
  <React.Fragment>
    <GlobalStyle />
    <App />
  </React.Fragment>
)

ReactDOM.render(<Root />, document.querySelector('#root'))

You can also use named imports:

// ES Modules
import { normalize, Normalize } from 'styled-normalize'

// CommonJS
const { normalize, Normalize } = require('styled-normalize')

styled-components v3

If you want to use styled-normalize with styled-components@v3 you should use prev npm tag.

npm install styled-normalize@prev

v3 don't supports createGlobalStyle API.

Version

NO SEMVER!

Why? Because X.Y numbers in vX.Y.Z version matches X.Y in normalize.css

License

The MIT License

da-ui-test2@oyvinmar-forks/shared-uida-ui-test@atk/mise-ui@thesaurus/componentsmeetup-ces-library-ui@i1r0/gatsby-theme-nehalem@asuite/ship-themingsilver-uidemo-package-2ice-ui-core-github@ardoq/shared-uistadtenergie@r3s-dev/design-systemmdlinx-smartestdockava-uidietgraph@everything-registry/sub-chunk-2841hyke-styleguide-testice-ui-coregatsby-theme-forked-lamgatsby-theme-genericharry-misegatsby-theme-cms-coregatsby-starter-skeletongatsby-theme-stoutlabs-configsghoulishhntailjp-portal-componentsjsonresume-theme-8-bit-sheepsq-design-system-testorion-uiparsley-storybooknw-lib-pocpaygreen-uinikitadubyk-react-components-librarylmnts-gatsby-ts-skeletonleapyear-ui-kitm7kvqbe1-react-component-librarymidas-coreuipubsweet-clientted-wen-ui-library-testtest-travistest-travis-2test-publish-jaytecra-foundarytecra-foundrytailor-uitheme-teststyple-uistyled-meowthree-divers-uiui-info-jingeonreact-auisim-component-libraryspectator-uk-web-uisecondstep-marketingrsoury-marketplacesizemometersizemometer-reportstnenopmoc-iuredesign-systemreact-misc-toolboxreact-zx-toolboxreactizerreact-scheduler-brreact-scheduler-ptrn-design-systemrm-coreuitsr-uivictory-docsusthing-uivavato-uiyang-coreui@grund/styleswavelet-faucetwes-coreui@htcoaching/styled-corecoinwatchlistai-consultant-lib@1thomas13/react-scheduleracinguiux-ds-react-framework@royalnavy/react-component-library@thesaurusds/components@thelostwatermelon/vivian-ui@s9devnpm/react-boxes@safr/react-starter@yoctol/ui@ylt-tw/cra-temp@visi/web-ui@tanker/verification-ui@_vlsu/components@bindle/library@wolfwave/componentscaptalys-core@ihollander/workshop-app@kriskaminski/gatsby-theme-krishalem@pil0t/gatsby-theme-airplane@moneygeek/ui-components@pipinosuke/gatsby-theme-nehalem
8.1.1

3 months ago

8.1.0

6 months ago

8.0.7

4 years ago

8.0.6

5 years ago

8.0.5-prev

5 years ago

8.0.5

5 years ago

8.0.4-prev

5 years ago

8.0.4

5 years ago

8.0.3

6 years ago

8.0.2

6 years ago

8.0.1

6 years ago

8.0.0

6 years ago

8.0.0-beta.1

6 years ago

4.0.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.3.0

6 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago