https://github.com/sergeysova/styled-modern-normalize
https://github.com/sergeysova/styled-modern-normalize
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/sergeysova/styled-modern-normalize
- Owner: sergeysova
- License: mit
- Created: 2018-10-28T09:09:38.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-28T14:46:59.000Z (over 7 years ago)
- Last Synced: 2025-03-29T11:06:16.881Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://npmjs.com/@styled/modern-normalize
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @styled/modern-normalize
CSS-normalize library for [styled-components][].
The original `modern-normalize.css` is pulled from [sindresorhus/modern-normalize][], and parsed into styled ready format.
## Usage
```sh
npm install --save @styled/modern-normalize
```
### Readme
Read styled-components [createGlobalStyle][] documentation
> This is just example
```js
import React from 'react'
import { Normalize } from '@styled/modern-normalize'
import { App } from './app'
const Root = () => (
)
```
> For older version of styled-components this API renders to `null`
You can also use named imports:
```js
// ES Modules
import { Normalize } from '@styled/modern-normalize'
// CommonJS
const { Normalize } = require('@styled/modern-normalize')
```
You can also import [css] without Component API:
```js
import { normalize } from '@styled/modern-normalize'
// Different from `Normalize`
// Example usage:
injectGlobal`
${normalize}
`
```
## License
The [MIT License](LICENSE)
[sindresorhus/modern-normalize]: https://github.com/sindresorhus/modern-normalize
[styled-components]: https://styled-components.com/
[createGlobalStyle]: https://www.styled-components.com/docs/api#createglobalstyle
[css]: https://www.styled-components.com/docs/api#css