Skip Navigation
EnumerationEnumeration

ColourSchemeToggle

The colour scheme toggle and page footer shared by all generated pages.

enum ColourSchemeToggle

Overview

The toggle mirrors swift-docc-render’s ColorSchemeToggle: a group of radio buttons labelled Light, Dark and Auto in the page footer. Choosing a scheme works without JavaScript, because the stylesheet (see stylesheet(includeDarkMode:)) sets the color-scheme of the body from the checked radio button, and the colour palette of the base stylesheet consists of light-dark() pairs that follow it. When JavaScript is available, script additionally remembers the choice across pages and forwards it to the embedded navigation sidebar.

This type is the single authoritative home of the names the footer markup, the stylesheet and the script must agree on.

Topics