
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
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,092,491 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.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.