# @csstools/postcss-exponential-functions

> Use pow(), sqrt(), hypot(), log(), exp() exponential functions in CSS

Latest version **3.0.6** (published 2026-09-13) · MIT-0 license · 0 weekly downloads

## Install

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

## Health

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

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

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 3.0.6 |
| Published | 2026-09-13 |
| First published | 2023-07-24 |
| Weekly downloads | 0 |
| License | MIT-0 |
| TypeScript types | none |
| Module format | ESM |
| Node | >=20.19.0 |
| Dependencies | 3 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1053 |
| Maintainers | jonathantneal, alaguna, romainmenke |
| Keywords | exp, exponential, hypot, log, postcss-plugin, pow, sqrt |

## Links

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

## Dependencies (3)

- [@csstools/css-calc](https://npm.io/package/@csstools/css-calc.md) ^3.4.0
- [@csstools/css-tokenizer](https://npm.io/package/@csstools/css-tokenizer.md) ^4.0.0
- [@csstools/css-parser-algorithms](https://npm.io/package/@csstools/css-parser-algorithms.md) ^4.0.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 3.0.6 (latest) — 2026-09-13
- 3.0.5 — 2026-09-06
- 3.0.4 — 2026-07-22
- 3.0.3 — 2026-05-13
- 3.0.2 — 2026-04-12
- 3.0.1 — 2026-02-21
- 3.0.0 — 2026-01-14
- 2.0.9 — 2025-05-27
- 2.0.8 — 2025-04-19
- 2.0.7 — 2025-02-23
- 2.0.6 — 2024-12-27
- 2.0.5 — 2024-11-11
- 2.0.4 — 2024-11-01
- 2.0.3 — 2024-10-23
- 2.0.2 — 2024-10-10
- … 12 more at https://npm.io/package/@csstools/postcss-exponential-functions/versions

## README

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

`npm install @csstools/postcss-exponential-functions --save-dev`

[PostCSS Exponential Functions] lets you use the `pow()`, `sqrt()`, `hypot()`, `log()`, `exp()` functions following the [CSS Values 4 Specification].

```css
.foo {
	top: calc(1px * pow(2, 3));
	line-height: sqrt(1.2);
	padding: hypot(3px, 4px);
	order: log(10, 10);
	min-height: calc(e - exp(1));
}

/* becomes */

.foo {
	top: calc(8px);
	line-height: calc(1.09545);
	padding: calc(5px);
	order: calc(1);
	min-height: calc(0);
}
```

## Usage

Add [PostCSS Exponential Functions] to your project:

```bash
npm install postcss @csstools/postcss-exponential-functions --save-dev
```

Use it as a [PostCSS] plugin:

```js
const postcss = require('postcss');
const postcssExponentialFunctions = require('@csstools/postcss-exponential-functions');

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



## Options

### preserve

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

```js
postcssExponentialFunctions({ preserve: true })
```

```css
.foo {
	top: calc(1px * pow(2, 3));
	line-height: sqrt(1.2);
	padding: hypot(3px, 4px);
	order: log(10, 10);
	min-height: calc(e - exp(1));
}

/* becomes */

.foo {
	top: calc(8px);
	top: calc(1px * pow(2, 3));
	line-height: calc(1.09545);
	line-height: sqrt(1.2);
	padding: calc(5px);
	padding: hypot(3px, 4px);
	order: calc(1);
	order: log(10, 10);
	min-height: calc(0);
	min-height: calc(e - exp(1));
}
```

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

[PostCSS]: https://github.com/postcss/postcss
[PostCSS Exponential Functions]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-exponential-functions
[CSS Values 4 Specification]: https://www.w3.org/TR/css-values-4/#exponent-funcs

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