
Security News
Next.js moves to scheduled security releases
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.
postcss-convert-values
Advanced tools
Convert values with PostCSS (e.g. ms -> s)
With npm do:
npm install postcss-convert-values --save
This plugin reduces CSS size by converting values to use different units
where possible; for example, 500ms can be represented as .5s. You can
read more about these units in this article.
h1 {
font-size: 16px;
width: 0em
}
h1 {
font-size: 1pc;
width: 0
}
Note that this plugin only covers conversions for duration and absolute length values. For color conversions, use [postcss-colormin][colormin].
Type: boolean
Default: true
Pass false to disable conversion from px to other absolute length units,
such as pc & pt & vice versa.
Type: boolean
Default: true
Pass false to disable conversion from ms to s & vice versa.
Type: boolean
Default: true
Pass false to disable conversion from deg to turn & vice versa.
Type: boolean|number
Default: false
Specify any numeric value here to round px values to that many decimal places;
for example, using {precision: 2} will round 6.66667px to 6.67px, and
{precision: 0} will round it to 7px. Passing false (the default) will
leave these values as is.
It is recommended for most use cases to set this option to 2.
See the PostCSS documentation for examples for your environment.
See CONTRIBUTORS.md.
MIT © Ben Briggs
cssnano is a modular CSS minifier that includes functionalities similar to postcss-convert-values as part of its optimizations. It can compress colors, remove comments, and deduplicate rules among other features, making it more comprehensive than postcss-convert-values.
clean-css is another CSS minifier and optimizer that can perform optimizations similar to postcss-convert-values, such as shortening color values and removing unnecessary characters. It offers a wide range of optimizations and is known for its balance between speed and efficiency.
FAQs
Convert values with PostCSS (e.g. ms -> s)
The npm package postcss-convert-values receives a total of 10,064,036 weekly downloads. As such, postcss-convert-values popularity was classified as popular.
We found that postcss-convert-values demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 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
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.

Research
/Security News
4 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.