---
title: "Feature: Display settings behind a cog button"
manual: "Frontend Theme for Extension Development"
version: "main"
source: "Changelog/2.0/Feature-DisplaySettings.rst"
modified: "2026-09-17T04:52:50+00:00"
---

# Feature: Display settings behind a cog button

## Description

The appearance and palette button groups of the site header are replaced by a
single settings button with a cog at the end of the header. It opens a panel
holding:

-   **Appearance** \- Auto, Light and Dark, as one segmented control.
-   **Palette** \- the five palettes as a list, each shown with its primary and
    its secondary colour.
-   **Element outlines** \- a switch for the outline and the `CType` label
    around every content element, which could only be set with the constant
    `theme.appearance.contentOutline` so far.
-   **Reset** \- back to the defaults of the site.

The two button groups took so much of the header that the site title and the
main navigation had almost no room left. With one button, the brand, the main
navigation and the settings share a single row at every width; below the
breakpoint of the main navigation the row holds the brand, the menu toggle and
the cog, and the expanded menu drops down under the header.

A choice applies at once and is kept in `localStorage` under three keys:
`theme-appearance`, `theme-palette` and, new,
`theme-content-outline`. The inline script in the document head applies a
stored outline before first paint, like the other two. No cookie is set.

The panel is a disclosure holding native radio groups and a switch, not an
ARIA menu: the radios keep their own keyboard behaviour, `Escape` closes
the panel and returns focus to the cog, and Tab past the last control or a
click outside closes it. Under forced colours the checked segment and the
switch paint with system colours, so they stay distinguishable. The panel id
and the radio names derive from the optional partial argument `idPrefix`
(`theme-settings` by default), so a page can carry a second instance.

## The defaults of the site

The three constants of [Feature: Appearance switcher](Feature-AppearanceSwitcher.html#feature-appearance-switcher) stay what configures
the defaults:

```typoscript
theme.appearance.default = auto
theme.appearance.palette = neutral
theme.appearance.contentOutline = on
```

They now also reach the page template, as the FLUIDTEMPLATE settings
`settings.appearance.default`,
`settings.appearance.palette` and
`settings.appearance.contentOutline`. The settings control checks
its initial options from them and renders them as
`data-theme-default-appearance`, `data-theme-default-palette` and
`data-theme-default-content-outline`, which is where **Reset**
takes them from. **Reset** removes the three stored keys rather than
storing the defaults, so a visitor who reset follows the constants of the site
again, including a constant changed afterwards.

A stored "Auto" is now kept as `auto` instead of removing the key, so on a
site whose default appearance is not `auto` the choice is no longer
lost on the next page.

## Impact

`Resources/Private/Partials/Page/Settings.html` replaces
`Resources/Private/Partials/Page/AppearanceSwitcher.html`, and
`Resources/Private/Scss/components/_settings.scss` replaces
`components/_appearance-switcher.scss`. The classes
`.theme-appearance-switcher` and `.theme-appearance*` are gone; the
new ones are `.theme-settings`, `.theme-segmented`,
`.theme-swatch-list`, `.theme-swatch-option` and
`.theme-swatch`. A site package overriding
`Partials/Page/Header.html` renders the partial `Page/Settings`
instead of `Page/AppearanceSwitcher`.

The switch of the panel is a general form control, `.theme-switch` in
`forms/_controls.scss`: a checkbox with `role="switch"`, for a
setting that takes effect the moment it is flipped.

```html
<label class="theme-switch">
    <input type="checkbox" role="switch" checked> <span>Element outlines</span>
</label>
```

The language labels `theme.settingsLabel`,
`theme.settingsContentOutline` and `theme.settingsReset` are
added; the appearance and palette labels are used as before.
