Skip Navigation
Type MethodMethod

generateCSS(from:includeDarkMode:)

Generates CSS variables from theme settings.

static func generateCSS(
    from settings: ThemeSettings.Root,
    includeDarkMode: Bool = true
) -> String

Parameters

settings

The theme settings to convert.

includeDarkMode

Whether to include dark mode styles.

Return Value

A CSS string with the custom properties.

Discussion

This method generates CSS custom properties for both light and dark modes, following the swift-docc-render naming convention.