# @csstools/postcss-initial

> PostCSS plugin to fallback initial keyword.

Latest version **3.0.0** (published 2026-01-14) · MIT-0 license · 0 weekly downloads

## Install

```sh
npm install @csstools/postcss-initial
pnpm add @csstools/postcss-initial
yarn add @csstools/postcss-initial
bun add @csstools/postcss-initial
```

## Health

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

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2026-01-14 |
| First published | 2023-09-18 |
| Weekly downloads | 0 |
| License | MIT-0 |
| TypeScript types | none |
| Module format | ESM |
| Node | >=20.19.0 |
| Dependencies | 0 |
| Unpacked size | 10.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1052 |
| Maintainers | jonathantneal, alaguna, romainmenke |
| Keywords | postcss-plugin |

## Links

- npm: https://www.npmjs.com/package/@csstools/postcss-initial
- Repository: https://github.com/csstools/postcss-plugins
- Homepage: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-initial#readme
- Issues: https://github.com/csstools/postcss-plugins/issues
- Funding: https://github.com/sponsors/csstools
- npm.io page: https://npm.io/package/@csstools/postcss-initial

## Recent versions

- 3.0.0 (latest) — 2026-01-14
- 2.0.1 — 2025-02-12
- 2.0.0 — 2024-08-03
- 1.0.1 — 2023-12-15
- 1.0.0 — 2023-09-18

## README

# PostCSS Initial [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][PostCSS]

`npm install @csstools/postcss-initial --save-dev`

[PostCSS Initial] fallback the `initial` keyword following the [CSS Cascade 4 Specification].

```css
.foo {
	border: initial;
}

/* becomes */

.foo {
	border: medium none currentcolor;
	border: initial;
}
```

_See prior work by [maximkoretskiy](https://github.com/maximkoretskiy) here [postcss-initial](https://github.com/maximkoretskiy/postcss-initial)
To ensure long term maintenance and to provide the needed features this plugin was recreated based on maximkoretskiy's work._

## Usage

Add [PostCSS Initial] to your project:

```bash
npm install postcss @csstools/postcss-initial --save-dev
```

Use it as a [PostCSS] plugin:

```js
const postcss = require('postcss');
const postcssInitial = require('@csstools/postcss-initial');

postcss([
	postcssInitial(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
```



## Options

### preserve

The `preserve` option determines whether the original notation
is preserved. By default, it is preserved.

```js
postcssInitial({ preserve: false })
```

```css
.foo {
	border: initial;
}

/* becomes */

.foo {
	border: medium none currentcolor;
}
```

[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
[css-url]: https://cssdb.org/#all-property
[discord]: https://discord.gg/bUadyRwkJS
[npm-url]: https://www.npmjs.com/package/@csstools/postcss-initial

[PostCSS]: https://github.com/postcss/postcss
[PostCSS Initial]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-initial
[CSS Cascade 4 Specification]: https://www.w3.org/TR/css-cascade-4/#initial

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