Skip to content

Function: matchesSyntax()

ts
function matchesSyntax(syntax, value): SyntaxMatch;

Defined in: packages/providers/src/syntax.ts:48

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

Whether it matches, and whether the check was skipped.

Released under the MIT License