# postcss-varfallback

> Use the fallback value of any var reference

Latest version **1.1.3** (published 2022-06-16) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install postcss-varfallback
pnpm add postcss-varfallback
yarn add postcss-varfallback
bun add postcss-varfallback
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2022-06-16 |
| First published | 2021-03-10 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 16.3 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Author | Larry Davis |
| Maintainers | garthdb, lazd |

## Links

- npm: https://www.npmjs.com/package/postcss-varfallback
- npm.io page: https://npm.io/package/postcss-varfallback

## Dependencies (2)

- [postcss](https://npm.io/package/postcss.md) ^7.0.36
- [postcss-value-parser](https://npm.io/package/postcss-value-parser.md) ^4.1.0

## Recent versions

- 1.1.3 (latest) — 2022-06-16
- 1.1.1-alpha.0 (beta) — 2021-04-27
- 1.1.2 — 2022-03-17
- 1.1.1 — 2021-10-14
- 1.1.0 — 2021-03-10

## README

# postcss-varfallback
> Use the fallback value of any var reference

## Installation

```sh
npm install postcss-varfallback
postcss -u postcss-varfallback -o dist/index.css src/index.css
```

## Usage

Assuming you have some CSS defined that uses fallback variables:

```css
:root {
  --component-background-color: blue;
}

.component {
  background-color: var(--mod-background-color, var(--component-background-color));
}
```

Running it through this plugin will produce:

```css
:root {
  --component-background-color: blue;
}

.component {
  background-color: var(--component-background-color);
}
```

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