---
url: /reference/packages/regex/src/namespaces/CssdocLocalPatterns/variables/SINGLE_CLASS.md
---
# Variable: SINGLE_CLASS

```ts
const SINGLE_CLASS: Regex<"^\\.(?<class>[A-Za-z_][\\w-]*)$", {
  flags: "u";
  names: {
     class: string;
  };
}>;
```

Defined in: [packages/regex/src/tiers/cssdoc-local.ts:48](https://github.com/thedannywahl/cssdoc/blob/main/packages/regex/src/tiers/cssdoc-local.ts#L48)

Single CSS Class Selector Pattern
Matches a selector that is exactly one class (no other selectors).
Used as a filter candidate for base class inference.

## Example

```ts
SINGLE_CLASS.test(".button") // true
SINGLE_CLASS.test(".button.active") // false
SINGLE_CLASS.test("button") // false
```
