# noExcessiveSelectorClasses

Rule `biome/noExcessiveSelectorClasses`. Limit the number of classes in a selector.

- Source: biome
- Technologies: CSS
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1907 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `complexity/noExcessiveSelectorClasses` | no | no | group complexity, since 2.4.12 | [docs](https://biomejs.dev/linter/rules/no-excessive-selector-classes/) |

## Code examples

### Incorrect: the rule reports this

```css
.foo .bar {}
```

```css
:is(.foo, .bar.baz) {}
```

### Correct: the rule accepts this

```css
.foo {}
```

```css
.foo, div {}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "complexity": {
        "noExcessiveSelectorClasses": "error"
      }
    }
  }
}
```

## Related rules

- [biome/noDrizzleDbObjectInsideTransaction](https://lintradar.dev/rules/biome/noDrizzleDbObjectInsideTransaction.md): Disallow using a Drizzle ORM instance inside its own transaction callback.
- [biome/noExcessiveSelectorComplexity](https://lintradar.dev/rules/biome/noExcessiveSelectorComplexity.md): Limit how complex selectors can be, and disallow chosen parts of selectors.
- [biome/noDisabledAttribute](https://lintradar.dev/rules/biome/noDisabledAttribute.md): Discourages the `disabled` attribute on form controls and on elements that act as buttons.
- [biome/noHexColors](https://lintradar.dev/rules/biome/noHexColors.md): Disallow hex colors.
- [biome/noConvexWrongRuntimeImports](https://lintradar.dev/rules/biome/noConvexWrongRuntimeImports.md): Disallow importing Node.js runtime files from Convex runtime files.
- [biome/noInlineStyles](https://lintradar.dev/rules/biome/noInlineStyles.md): Disallow the use of inline styles.

---

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