Skip Navigation
Instance MethodMethod

generateStylesheetArray(_:baseIndent:)

Generates an array literal of stylesheets.

func generateStylesheetArray(
    _ stylesheets: [ThemeStylesheet],
    baseIndent: Int
) -> String

Parameters

stylesheets

The stylesheets in application order.

baseIndent

The indentation level of the line the array starts on.

Return Value

The Swift code for the array literal.

Discussion

The CSS text is embedded as a raw multi-line string literal, so it needs no escaping and stays readable in the generated file.