8.1.1 • Published 2 years ago

styled-normalize v8.1.1

Weekly downloads
70,220
License
MIT
Repository
github
Last release
2 years 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@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-2841harry-misetailor-uiwes-coreuited-wen-ui-library-testtecra-foundarytecra-foundrytest-publish-jaytheme-testthree-divers-uivavato-uivictory-docs@cangir/gatsby-theme-cms-core@paybark/paybark-ui@paygreen/paygreen-ui@royalnavy/react-component-libraryjp-portal-componentsjsonresume-theme-8-bit-sheephyke-styleguide-testhntailm7kvqbe1-react-component-librarylmnts-gatsby-ts-skeletonleapyear-ui-kitreactizer@wolfwave/components@thesaurusds/components@thelostwatermelon/vivian-ui@vincentcupid/react-scheduler@untile/react-components@untile/react-core@voyageapp/shared-ui@ur.software/react-scheduler@visi/web-ui@yehn/react-ui-kit@y0u5s3f/custom-react-scheduler@ylt-tw/cra-temp@yoctol/ui@zopauk/react-components@zuffik/uiacinguiux-ds-react-frameworkai-consultant-libaquanrg-websiteapollion-ds-core@atk/mise-ui@1thomas13/react-scheduler@grund/styles@10ure-devs/react-scheduler@_vlsu/components@aircall/tractor@adm-public/react-components@advtr/tidy@coderkaine/react-scheduler@coko/client@commerce7/admin-ui@commondatafactory/design-system@commonground/design-system@commonplace/ui@alefiori/react-schedulertest-travistest-travis-2ice-ui-corestyled-meowstyple-uispectator-uk-web-uisq-design-system-teststnenopmoc-iutwo-birds-schedulertsr-uiui-info-jingeonusthing-ui@baronbeans/gatsby-theme-medal@baradm100/gatsby-theme-admonation@bitnoi.se/react-scheduler@bindle/library@blacksparrow/gatsby-theme-blacksparrow@captalys-platform/core@britishlibrary/component-library@ceruleandatahub/react-componentsyang-coreuiwavelet-faucet@infinitebrahmanuniverse/nolb-styled@kriskaminski/gatsby-theme-krishalem@loque/react-gui@muya-ui/theme-light
8.1.1

2 years ago

8.1.0

2 years ago

8.0.7

6 years ago

8.0.6

7 years ago

8.0.5-prev

7 years ago

8.0.5

7 years ago

8.0.4-prev

7 years ago

8.0.4

7 years ago

8.0.3

7 years ago

8.0.2

7 years ago

8.0.1

7 years ago

8.0.0

7 years ago

8.0.0-beta.1

7 years ago

4.0.0

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.3.0

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.1.0

8 years ago

1.0.0

9 years ago