# postcss-reduce-initial

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

Latest version **9.0.2** (published 2026-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-reduce-initial
pnpm add postcss-reduce-initial
yarn add postcss-reduce-initial
bun add postcss-reduce-initial
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 9.0.2 |
| Published | 2026-09-05 |
| First published | 2016-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4976 |
| Author | Ben Briggs |
| Maintainers | beneb, ludovicofischer, ai, chriseppstein, andyjansson, evilebottnawi, cssnano-bot |
| Keywords | css, postcss, postcss-plugin |

## Links

- npm: https://www.npmjs.com/package/postcss-reduce-initial
- Repository: https://github.com/cssnano/cssnano
- Issues: https://github.com/cssnano/cssnano/issues
- npm.io page: https://npm.io/package/postcss-reduce-initial

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 9.0.2 (latest) — 2026-09-05
- 5.0.0-rc.2 (next) — 2021-03-15
- 4.0.0-nightly.2020.2.6 (nightly) — 2021-02-06
- 9.0.1 — 2026-09-01
- 9.0.0 — 2026-08-27
- 8.0.5 — 2026-08-20
- 8.0.4 — 2026-08-16
- 8.0.3 — 2026-08-09
- 8.0.2 — 2026-08-04
- 8.0.1 — 2026-06-11
- 8.0.0 — 2026-05-06
- 7.0.9 — 2026-05-02
- 7.0.8 — 2026-04-20
- 7.0.7 — 2026-04-13
- 7.0.6 — 2026-03-06
- … 44 more at https://npm.io/package/postcss-reduce-initial/versions

## README

# [postcss][postcss]-reduce-initial

> Reduce `initial` definitions to the _actual_ initial value, where possible.

## Install

With [npm](https://npmjs.org/package/postcss-reduce-initial) do:

```
npm install postcss-reduce-initial --save
```

## Examples

See the [data](src/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

```css
h1 {
  min-width: initial;
}
```

#### Output

```css
h1 {
  min-width: auto;
}
```

### Convert values back to `initial`

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

#### Input

```css
h1 {
  transform-box: border-box;
}
```

#### Output

```css
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](https://github.com/postcss/postcss#usage) for
examples for your environment.

## Contributors

See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/main/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](https://creativecommons.org/publicdomain/zero/1.0/).

MIT © [Ben Briggs](https://beneb.info)

[postcss]: https://github.com/postcss/postcss

---
_Source: https://npm.io/package/postcss-reduce-initial · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
