# noDescendingSpecificity

Rule `biome/noDescendingSpecificity`. Disallow lower-specificity selectors after higher-specificity selectors.

- Source: biome
- Technologies: CSS
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #500 by reach, #135 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `style/noDescendingSpecificity` | yes | no | group style, since 1.9.3 | [docs](https://biomejs.dev/linter/rules/no-descending-specificity/) |

## Code examples

### Incorrect: the rule reports this

```css
b a { color: red; }
a { color: red; }
```

```css
a {
  & > b { color: red; }
}
b { color: red; }
```

```css
:root input {
    color: red;
}
html input {
    color: red;
}
```

### Correct: the rule accepts this

```css
a { color: red; }
b a { color: red; }
```

```css
b { color: red; }
a {
  & > b { color: red; }
}
```

```css
a { color: red; }
a:hover { color: red; }
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "noDescendingSpecificity": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noDeprecatedMediaType](https://lintradar.dev/rules/biome/noDeprecatedMediaType.md): Disallow deprecated media types.
- [biome/noDrizzleDeleteWithoutWhere](https://lintradar.dev/rules/biome/noDrizzleDeleteWithoutWhere.md): Require `.where()` to be called when using `.delete()` with Drizzle ORM.
- [biome/noConvexTopOfHourCrons](https://lintradar.dev/rules/biome/noConvexTopOfHourCrons.md): Disallow scheduling Convex cron jobs at the start of the hour.
- [biome/noDrizzleUpdateWithoutWhere](https://lintradar.dev/rules/biome/noDrizzleUpdateWithoutWhere.md): Require `.where()` to be called when using `.update()` with Drizzle ORM.
- [biome/noConvexTimeOrRandomInQueries](https://lintradar.dev/rules/biome/noConvexTimeOrRandomInQueries.md): Disallow reading the current time or generating random values in Convex queries.
- [biome/noDuplicateArgumentNames](https://lintradar.dev/rules/biome/noDuplicateArgumentNames.md): Require unique argument names for fields and directives.

---

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