---
url: /reference/@cssdoc/cssdoc/functions/matchesSyntax.md
---
# Function: matchesSyntax()

```ts
function matchesSyntax(syntax, value): SyntaxMatch;
```

Defined in: [packages/providers/src/syntax.ts:48](https://github.com/thedannywahl/cssdoc/blob/main/packages/providers/src/syntax.ts#L48)

Whether `value` conforms to a `@property` `syntax` string (e.g. `<length>`, `<color> | none`,
`<length>+`). Universal syntax (`*`), substitution values, and CSS-wide keywords are skipped.

## Parameters

### syntax

`string`

The `@property` `syntax` descriptor.

### value

`string`

The CSS value to check.

## Returns

[`SyntaxMatch`](../interfaces/SyntaxMatch.md)

Whether it matches, and whether the check was skipped.
