Skip Navigation
Type MethodMethod

symbolDefinitions(for:additionalDrawings:)

Returns a hidden SVG element defining the drawings of the given topic types’ icons, which referenceMarkup(for:additionalClass:) refers to.

static func symbolDefinitions(
    for types: some Sequence<String>,
    additionalDrawings: [(identifier: String, svg: String)] = []
) -> String

Parameters

types

The type names whose icons a document shows.

additionalDrawings

Further icons to define, as identifiers and complete SVG elements, such as the chevron of disclosure toggles.

Return Value

The SVG element, or an empty string if there is nothing to define.

Discussion

Each drawing is a <symbol> with the content and the view box of the type’s icon and the identifier symbolIdentifier(for:); the element takes no space in the layout.