![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
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-minify-gradients
Advanced tools
The postcss-minify-gradients npm package is a plugin for PostCSS, a tool for transforming CSS with JavaScript. This plugin reduces the size of gradient definitions in CSS by converting linear-gradient and radial-gradient functions to their more concise forms when possible, thus optimizing the CSS for better performance.
Minify linear gradients
Converts verbose linear gradient definitions to shorter equivalents when possible, without changing the visual appearance of the gradient.
require('postcss-minify-gradients')
Minify radial gradients
Optimizes radial gradient definitions by simplifying their syntax and removing unnecessary parts.
require('postcss-minify-gradients')
Convert repeating gradients
Transforms repeating linear-gradient and repeating radial-gradient functions into their more compact forms if it results in smaller CSS size.
require('postcss-minify-gradients')
cssnano is a modular CSS minifier that includes various optimizations, including gradient minification. It can be more comprehensive than postcss-minify-gradients as it covers a wider range of CSS optimizations.
clean-css is another CSS minifier that provides optimizations for various CSS features, including gradients. It can be used as an alternative to postcss-minify-gradients and offers a command-line interface as well as a library.
postcss-preset-env is a plugin that allows you to use future CSS features today. It includes autoprefixer and other plugins that can optimize gradients, though it is not solely focused on gradient minification like postcss-minify-gradients.
Minify gradient parameters with PostCSS.
With npm do:
npm install postcss-minify-gradients
Where possible, this module will minify gradient parameters. It can convert
linear gradient directional syntax to angles, remove the unnecessary 0%
and
100%
start and end values, and minimise color stops that use the same length
values (the browser will adjust the value automatically).
h1 {
background: linear-gradient(to bottom, #ffe500 0%, #ffe500 50%, #121 50%, #121 100%)
}
h1 {
background: linear-gradient(180deg, #ffe500, #ffe500 50%, #121 0, #121)
}
See the PostCSS documentation for examples for your environment.
See CONTRIBUTORS.md.
MIT © Ben Briggs
FAQs
Minify gradient parameters with PostCSS.
The npm package postcss-minify-gradients receives a total of 0 weekly downloads. As such, postcss-minify-gradients popularity was classified as not popular.
We found that postcss-minify-gradients 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.