
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
styled-normalize
Advanced tools
CSS-normalize library for styled-components.
The original normalize.css
is pulled from necolas/normalize.css, and parsed into styled ready format.
npm install --save styled-normalize
yarn add styled-normalize
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')
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.
NO SEMVER!
Why? Because X.Y numbers in vX.Y.Z
version matches X.Y in normalize.css
The MIT License
FAQs
Normalize.css for styled-components CSS-in-JS library
The npm package styled-normalize receives a total of 0 weekly downloads. As such, styled-normalize popularity was classified as not popular.
We found that styled-normalize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.