Skip Navigation
Type MethodMethod

generateLightModeCSS(from:)

Generates light mode CSS variables.

static func generateLightModeCSS(from settings: ThemeSettings.Root) -> String

Parameters

settings

The theme settings.

Return Value

CSS for light mode variables, or an empty string if the settings define none.

Discussion

The variables are defined on the body element, where the base stylesheet defines its colour palette, and on the root element, whose font size the settings can also set.