Table of Contents

Method IsArbitraryFontClass

Namespace
Velvet
Assembly
Velvet.Docs.dll

IsArbitraryFontClass(string)

True when cls is an arbitrary font class (font-[…]). These are owned by StyleFontResolver (resolved from the whole class array and applied as inline style), so the reconciler must keep them out of the USS class list — unlike the non-bracket font classes (font-bold, font-sans, …) which stay in the list as the USS fallback. Single source of truth for the AddClass / RemoveClass / ApplyClassNames exclusion checks. Routed through Velvet.StyleArbitraryValueResolver.StripImportant(string, out bool) first so an important-modifier bang (!font-[…] / font-[…]!) is tolerated: the 3 call sites above run THIS check before their own StripImportant call, so a bang'd token that only matched the un-prefixed form would fall through, have its bang stripped downstream, and leak the bare bracket core into the class list as a dead token. The modifier itself stays a no-op for this family either way (see StripImportant's own Scope comment) — this only makes the classlist guard agree with the stripper on what counts as "this family".

public static bool IsArbitraryFontClass(string cls)

Parameters

cls string

Returns

bool