postcss-reduce-initial
Reduce initial definitions to the actual initial value, where possible.
Last updated 3 years ago by ludovicofischer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install postcss-reduce-initial 
SYNC missed versions from official npm registry.

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: auto;
}

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

Current Tags

  • 7.0.2                                ...           latest (3 months ago)
  • 5.0.0-rc.2                                ...           next (4 years ago)
  • 4.0.0-nightly.2020.2.6                                ...           nightly (4 years ago)

43 Versions

  • 7.0.2                                ...           3 months ago
  • 7.0.1                                ...           5 months ago
  • 7.0.0                                ...           7 months ago
  • 6.1.0                                ...           8 months ago
  • 6.0.3                                ...           9 months ago
  • 6.0.2                                ...           10 months ago
  • 6.0.1                                ...           a year ago
  • 6.0.0                                ...           2 years ago
  • 5.1.2                                ...           2 years ago
  • 5.1.1                                ...           2 years ago
  • 5.1.0                                ...           3 years ago
  • 5.0.3                                ...           3 years ago
  • 5.0.2                                ...           3 years ago
  • 5.0.1                                ...           3 years ago
  • 5.0.0                                ...           4 years ago
  • 5.0.0-rc.2                                ...           4 years ago
  • 5.0.0-rc.1                                ...           4 years ago
  • 5.0.0-rc.0                                ...           4 years ago
  • 4.0.0-nightly.2020.2.6                                ...           4 years ago
  • 4.0.0-nightly.2020.1.11                                ...           4 years ago
  • 4.0.0-nightly.2020.1.9                                ...           4 years ago
  • 4.0.0-nightly.2020.10.20                                ...           4 years ago
  • 4.0.0-nightly.2020.9.9                                ...           4 years ago
  • 4.0.0-nightly.2020.9.3                                ...           4 years ago
  • 4.0.0-nightly.2020.9.1                                ...           4 years ago
  • 4.0.0-nightly.2020.8.29                                ...           4 years ago
  • 4.0.0-nightly.2020.8.25                                ...           4 years ago
  • 4.0.0-nightly.2020.8.24                                ...           4 years ago
  • 4.0.0-nightly.2020.8.17                                ...           4 years ago
  • 4.0.0-nightly.2020.8.10                                ...           4 years ago
  • 4.0.0-nightly.2020.8.4                                ...           4 years ago
  • 4.0.0-nightly.2020.8.1                                ...           4 years ago
  • 4.0.0-nightly.2020.7.31                                ...           4 years ago
  • 4.0.0-nightly.2020.7.25                                ...           4 years ago
  • 4.0.0-nightly.2020.7.24                                ...           4 years ago
  • 4.0.3                                ...           6 years ago
  • 4.0.2                                ...           6 years ago
  • 4.0.1                                ...           6 years ago
  • 4.0.0                                ...           6 years ago
  • 4.0.0-rc.2                                ...           7 years ago
  • 4.0.0-rc.0                                ...           7 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE