---
title: "incompatible-theme-value"
description: "Reports a theme token with a value of the wrong type for its namespace, such as a length for a color."
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.

# incompatible-theme-value

This rule reports a theme token whose value does not match the type of its
namespace. For example, tokens in `--color-*` must be colors, so a length makes
`bg-brand` and the other color utilities write an invalid value.

## Reported

```css
@theme {
  --color-brand: 1rem;
}
```

> incompatible-theme-value: `1rem` is not a valid value for `--color-brand` because tokens of `--color-*` must be `color`
> 
> Example:2:18

## Fixed

```css
@theme {
  --spacing-brand: 1rem;
}
```

## How to fix

- If the value is right, move the token to the namespace of that type, such as
  `--spacing-*` for a length, as in the example.
- If the namespace is right, correct the value, such as a color for `--color-*`.

## Rule settings

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

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

Source: https://stillwind.dev/docs/lints/incompatible-theme-value/index.mdx
