
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
postcss-normalize-repeat-style
Advanced tools
Convert two value syntax for repeat-style into one value.
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.
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
Convert two value syntax for repeat-style into one value.
The npm package postcss-normalize-repeat-style receives a total of 8,523,487 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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.