---
title: "ambiguous-style-base-order"
description: "Reports two independent base styles in one call that set the same property."
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.

# ambiguous-style-base-order

This rule reports a `style()` call with two base styles that set the same
property, when neither base is built on the other. The order of the arguments
does not decide which base wins, so the result is not defined.

## Reported

```tsx
const first = style("p-2");
const second = style("p-4");
export const props = style(first, second);
```

> ambiguous-style-base-order: two composition bases declare `padding`; neither base precedes the other, so which declaration wins is undefined
> 
> Example:3:22

## Fixed

```tsx
const first = style("p-2");
const second = style(first, "p-4");
export const props = style(second);
```

## How to fix

- Build the overriding base on the other one, as in the example. Then its
  utilities always win.
- Or remove the property from one of the bases.

Bases that set different properties do not need this.

## Rule settings

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

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

The CLI and the editor report this rule only when they analyze the whole project.

Source: https://stillwind.dev/docs/lints/ambiguous-style-base-order/index.mdx
