Review main Ready for review

93477[TASK] Add toggle for dark and light mode to Camino theme

David Bruchmann CR 0 V 0 Hard +573 −5 updated 11/12/26, 16:11

Commit message

The Camino theme was only available in light mode. Every color
scheme now has a dark variant, and a new site setting adds a
toggle to the page header that lets visitors switch between light
and dark mode. The toggle is available as a single button or as a
button group, each with two (light, dark) or three (light, system,
dark) options. Without a toggle the website stays in light mode,
so existing sites are not affected.

The dark variant is built with the CSS light-dark() function: the
neutral and primary color scales are reversed in dark mode, which
keeps the contrast of all components without component-specific
overrides. Browsers without support for light-dark() keep the
light colors. A few hard-coded colors in the header are replaced
by theme colors to make this work.

The choice of the visitor is stored in the browser. A small script
in the document head applies it before the first paint, and it is
only loaded if a toggle is enabled.

In addition, the main menu becomes usable with the keyboard: the
button opening the menu on small screens is a real button element
that exposes its state, and the sub-navigation on large screens
opens when one of its links receives the focus.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/77/93477/4 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/77/93477/4 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 5

  1. main 93740[Task] add favicon, improve CSS Based on this change Abandoned David Bruchmann CR 0 V -1 Easy +5 −19
  2. main 93739[TASK] add favicon files, adjust CSS, prepare JS for sub-navigation Based on this change Abandoned David Bruchmann CR 0 V -1 Hard +155 −669
  3. main 93738[FEATURE] add theme switch for static website Based on this change Abandoned David Bruchmann CR 0 V -1 Expert +1494 −163
  4. main 93481[BUGFIX] Assign colors by variables as far as possible. Based on this change Abandoned David Bruchmann CR 0 V -1 Normal +15 −64
  5. 93477 [TASK] Add toggle for dark and light mode to Camino theme This change

Issues 1

Files 17

Review log 812

  1. David Bruchmann uploaded patch set 1 03/31/26, 06:24

  2. David Bruchmann rebased onto patch set 2 03/31/26, 06:28

  3. Benjamin Kott commented on patch set 2 CR -1 03/31/26, 06:44

    _css-variables-dark-mode.css:23

    we use light-dark and not hex colors direclty
  4. core-ci voted on patch set 1 V -1 03/31/26, 07:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99218

  5. core-ci voted on patch set 2 V -1 03/31/26, 07:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99222

  6. David Bruchmann commented on patch set 2 03/31/26, 07:34

    _css-variables-dark-mode.css:23 Reply

    I changed the notation, which reduces also the code. Primary colors have to be redefined though with real colors, I think.
  7. David Bruchmann rebased onto patch set 3 CR -1 V -1 04/20/26, 08:35

  8. core-ci voted on patch set 3 V -1 04/20/26, 09:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100524

  9. Garvin Hicking marked it work in progress 04/20/26, 16:29

  10. Benni Mack uploaded patch set 4 V -1 11/12/26, 14:53

  11. core-ci voted on patch set 4 V +1 11/12/26, 15:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114196

  12. Benni Mack marked it ready for review 11/12/26, 16:11