XWiki improvement proposal

Automatic Light/Dark Theme Switching for XWiki

Allow XWiki to use separate light and dark Color Themes and automatically follow the user's browser or operating-system appearance preference.

View forum discussion

The proposed improvement

The goal is to build on XWiki's existing Color Theme support and make light/dark appearance a native user preference rather than another installation-specific customization.

Current limitation

XWiki supports Color Themes, including light and dark designs, but there is no standard way to pair them and automatically select one based on the user's system preference.

  • Organizations need custom logic for automatic switching
  • Users cannot simply choose System, Light or Dark

Proposed behavior

Extend the existing Color Theme mechanism instead of introducing a new skin or separate theming system.

  • Administrators select a light and a dark Color Theme
  • Users choose System / Automatic, Light or Dark
  • Automatic mode follows the browser prefers-color-scheme preference

Still to be defined

The exact implementation should be agreed before development starts.

  • Anonymous-user preference handling
  • Preference persistence
  • Behaviour when the system theme changes while XWiki is open
  • Backward compatibility with existing Color Theme configuration

Funding target: To be estimated after the technical direction is clarified. Development should follow XWiki's normal architecture, testing, compatibility and contribution practices.

See Open Source XWiki Development for details about funding, co-funding and the contribution process.