# postcss-use-logical

> Converts physical properties into logical properties

Latest version **0.1.5** (published 2024-11-09) · 0 weekly downloads

## Install

```sh
npm install postcss-use-logical
pnpm add postcss-use-logical
yarn add postcss-use-logical
bun add postcss-use-logical
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2024-11-09 |
| First published | 2023-09-03 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Mayank |
| Maintainers | mayank-99 |
| Keywords | postcss, postcss-plugin, properties, logical, physical, rtl |

## Links

- npm: https://www.npmjs.com/package/postcss-use-logical
- Repository: https://github.com/mayank99/postcss-use-logical
- Homepage: https://github.com/mayank99/postcss-use-logical#readme
- Issues: https://github.com/mayank99/postcss-use-logical/issues
- npm.io page: https://npm.io/package/postcss-use-logical

## 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

- 0.1.5 (latest) — 2024-11-09
- 0.1.4 — 2023-09-06
- 0.1.3 — 2023-09-06
- 0.1.2 — 2023-09-06
- 0.1.1 — 2023-09-06
- 0.1.0 — 2023-09-03

## README

# postcss-use-logical

PostCSS plugin that essentially does the opposite of [`postcss-logical`](https://www.npmjs.com/package/postcss-logical); it converts physical CSS properties into their logical equivalents.

Check out demo/playground at: https://logical.mynk.app/

## Usage

This plugin is designed to be run as a one-off script for migrating entire codebases from physical properties to logical ones. It probably should *not* be added to your project's regular PostCSS config.

```
npm install postcss postcss-use-logical
```

```js
import postcss from 'postcss';
import postcssUseLogical from 'postcss-use-logical';

postcss([postcssUseLogical]).process(/* ... */);
```

> **Note**
> This plugin will convert _all_ physical properties, which may not always be desirable. Always verify the changes manually.

## Example

Input:

```css
.element {
  height: 100px;
  max-width: 400px;
  width: 200px;
  padding-top: 10px;
  padding-bottom: 20px;
  margin: 0 auto;
}
```

Output:

```css
.element {
  block-size: 100px;
  max-inline-size: 400px;
  inline-size: 200px;
  padding-block: 10px 20px;
  margin-block: 0;
  margin-inline: auto;
}
```

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