---
title: "no-arbitrary-spacing"
description: "Reports margin, padding, and gap written as arbitrary values, such as p-[13px]."
image: "https://stillwind.dev/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://stillwind.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# no-arbitrary-spacing

This rule reports margin, padding, or gap written as an arbitrary value, such as
`p-[13px]`. The CSS works, but the value is not on your spacing scale. No preset
enables this rule.

## Reported

```tsx
style("p-[13px]");
```

> no-arbitrary-spacing: arbitrary spacing `13px` is forbidden for `padding`; use the spacing scale or a custom property
> 
> Example:1:8

## Fixed

```css
@theme {
  --spacing-panel: 13px;
}
```

```tsx
style("p-panel");
```

## How to fix

- Give the value a theme name for its role, as in the example. This keeps the
  same 13px padding while making it available to other components.
- Use an existing spacing value if the design allows a different size.

## Options

`properties` lists more CSS properties to check, in addition to margin, padding,
and gap.

## Rule settings

| Preset | Severity |
| --- | --- |
| `recommended` | off |
| `strict` | off |
| `stylistic` | off |

| Option | Default |
| --- | --- |
| `properties` | `[]` |

[Configure lint](/docs/configuration#lint) to change the severity or options.

Source: https://stillwind.dev/docs/lints/no-arbitrary-spacing/index.mdx
