
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
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 10,217,263 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.