Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
postcss-normalize-repeat-style
Advanced tools
Package description
The postcss-normalize-repeat-style npm package is a PostCSS plugin designed to normalize repeat styles in CSS. This includes simplifying repeat style values in background and background-image properties to use the shorthand form when possible, improving both the readability and efficiency of the CSS.
Normalize repeat styles for background
This feature automatically converts longhand repeat styles for the background property into their shorthand form, making the CSS cleaner and more concise.
"background: repeat no-repeat" becomes "background: repeat-x"
Optimize background-image repeat styles
For background images with repeat styles, this plugin optimizes the declaration by merging them into a single, shorthand property, enhancing the efficiency of the CSS.
"background-image: url('image.png'); background-repeat: repeat no-repeat" becomes "background: url('image.png') repeat-x"
cssnano is a modular CSS minifier that includes functionalities similar to postcss-normalize-repeat-style as part of its optimizations. It compresses CSS by normalizing styles, including repeat styles, but offers a broader range of optimizations beyond what postcss-normalize-repeat-style provides.
postcss-merge-longhand is a PostCSS plugin that merges longhand properties into shorthand where possible, similar to how postcss-normalize-repeat-style optimizes repeat styles. While it covers a wider range of properties, its approach to optimizing repeat styles in background and background-image properties is similar.
Readme
Normalize repeat styles with PostCSS.
With npm do:
npm install postcss-normalize-repeat-style --save
h1 {
background: url(image.jpg) repeat no-repeat
}
h1 {
background: url(image.jpg) repeat-x
}
See the PostCSS documentation for examples for your environment.
See CONTRIBUTORS.md.
MIT © Ben Briggs
FAQs
Unknown package
The npm package postcss-normalize-repeat-style receives a total of 6,043,661 weekly downloads. As such, postcss-normalize-repeat-style popularity was classified as popular.
We found that postcss-normalize-repeat-style demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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 unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.