Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

postcss-reduce-initial

Package Overview
Dependencies
2
Maintainers
7
Versions
34
Issues
File Explorer

Advanced tools

postcss-reduce-initial

Reduce initial definitions to the actual initial value, where possible.

    5.1.1latest
    Github

Version published
Maintainers
7
Weekly downloads
11,547,336
increased by8.29%

Weekly downloads

Changelog

Source

v5.1.14

Bug Fixes

  • fix: update autoprefixer and browserslist
  • fix(postcss-reduce-initial): improve initial properties data

Readme

Source

postcss-reduce-initial

Reduce initial definitions to the actual initial value, where possible.

Install

With npm do:

npm install postcss-reduce-initial --save

Examples

See the data for more conversions. This data is courtesy of Mozilla.

Convert initial values

When the initial keyword is longer than the property value, it will be converted:

Input
h1 { min-width: initial; }
Output
h1 { min-width: 0; }

Convert values back to initial

When the initial value is smaller than the property value, it will be converted:

Input
h1 { transform-box: border-box; }
Output
h1 { transform-box: initial; }

This conversion is only applied when you supply a browsers list that all support the initial keyword; it's worth noting that Internet Explorer has no support.

API

reduceInitial([options])

options
ignore

Type: Array<String> Default: undefined

It contains the Array of properties that will be ignored while reducing its value to initial. Example : { ignore : ["min-height"] }

Usage

See the PostCSS documentation for examples for your environment.

Contributors

See CONTRIBUTORS.md.

License

This program uses a list of CSS properties derived from data maintained my the MDN team at Mozilla and licensed under the CC0 1.0 Universal Public Domain Dedication.

MIT © Ben Briggs

Keywords

FAQs

What is postcss-reduce-initial?

Reduce initial definitions to the actual initial value, where possible.

Is postcss-reduce-initial popular?

The npm package postcss-reduce-initial receives a total of 11,074,409 weekly downloads. As such, postcss-reduce-initial popularity was classified as popular.

Is postcss-reduce-initial well maintained?

We found that postcss-reduce-initial 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.

Last updated on 28 Oct 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc