Method ApplyIfPresent
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
ApplyIfPresent(VisualElement, string[])
Create/mount-time entry point: resolves the font intent only when classNames
carries a font class. A freshly created (or pool-reset) element has no inline font to clear, so
for the ~99% of elements with no font class this gate skips the resolve entirely (mirroring the
gap manipulator's HasGapClass early-out). Single source of truth for the create-side gate.
public static void ApplyIfPresent(VisualElement element, string[] classNames)
Parameters
elementVisualElementclassNamesstring[]