---
url: /reference/packages/regex/src/namespaces/CssSpecPatterns/variables/CSS_FUNCTION.md
---
# Variable: CSS_FUNCTION

```ts
const CSS_FUNCTION: Regex<"(?<name>[a-zA-Z_\\-\\u0080-\\uFFFF][\\w\\-\\u0080-\\uFFFF]*)[\\s\\t]*\\(", {
  names: {
     name: string;
  };
}>;
```

Defined in: [packages/regex/src/tiers/css-spec.ts:115](https://github.com/thedannywahl/cssdoc/blob/main/packages/regex/src/tiers/css-spec.ts#L115)

CSS function from W3C formal grammar.
Function name (identifier) followed by opening parenthesis.

## Example

```ts
CSS_FUNCTION.exec("rgb(")?.groups?.name // "rgb"
CSS_FUNCTION.exec("var (")?.groups?.name // "var"
```
