# useLogicalProperties

Rule `biome/useLogicalProperties`. Prefer logical CSS properties over physical properties.

- Source: biome
- Technologies: CSS
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1960 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/useLogicalProperties` | no | unsafe | group nursery, since 2.5.15 | [docs](https://biomejs.dev/linter/rules/use-logical-properties/) |

## Code examples

### Incorrect: the rule reports this

```css
p {
  margin: 1px 2px;
}
```

```css
p {
  padding: var(--spacing) 2px;
}
```

```css
p {
  margin-block-start: 1px;
  margin-block-end: 2px;
}
```

### Correct: the rule accepts this

```css
p {
  inline-size: 100%;
  inset-block-start: 0;
  margin-inline-start: 1rem;
  border-inline-start: 1px solid;
  float: inline-start;
  text-align: end;
  justify-content: start;
  inline-size: anchor-size(self-inline);
  block-size: anchor-size(self-block);
  inset-block-start: anchor(end);
}
```

```css
p {
  margin: 1px;
  margin: var(--spacing);
  margin-block: 1px 2px;
  color: red;
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "useLogicalProperties": "error"
      }
    }
  }
}
```

## Related rules

- [biome/useLayeredStyles](https://lintradar.dev/rules/biome/useLayeredStyles.md): Enforce style rules to be defined within a cascade layer.
- [biome/useNamedLayer](https://lintradar.dev/rules/biome/useNamedLayer.md): Disallow anonymous cascade layers.
- [biome/useJsonImportAttributes](https://lintradar.dev/rules/biome/useJsonImportAttributes.md): Enforces the use of `with { type: "json" }` for JSON module imports.
- [biome/usePackageJsonCpu](https://lintradar.dev/rules/biome/usePackageJsonCpu.md): Require the `cpu` field in `package.json`.
- [biome/useDisposables](https://lintradar.dev/rules/biome/useDisposables.md): Detects a disposable object assigned to a variable without using or await using syntax.
- [biome/usePackageJsonEngines](https://lintradar.dev/rules/biome/usePackageJsonEngines.md): Require the `engines` field in `package.json`.

---

Web page: https://lintradar.dev/rules/biome/useLogicalProperties. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
