You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/08/27 16:09:51 UTC

(superset) 01/01: docs(theming): document THEME_DEFAULT_MODE config setting

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch fix/from-pr-41007-needs-docs-feat-theme-make-default-theme
in repository https://gitbox.apache.org/repos/asf/superset.git

commit f1086ad758d03f1f10608e5e18008c3b5dd9844c
Author: rusackas <ev...@rusackas.com>
AuthorDate: Thu Aug 27 09:09:18 2026 -0700

    docs(theming): document THEME_DEFAULT_MODE config setting
    
    The theming.mdx config reference covers THEME_DEFAULT/THEME_DARK but
    was never updated for THEME_DEFAULT_MODE, added in #41007, which lets
    operators default the instance to dark/light instead of following the
    system preference.
    
    Follow-up to #41007.
    
    Co-Authored-By: Claude Sonnet 5 <no...@anthropic.com>
---
 docs/admin_docs/configuration/theming.mdx | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/docs/admin_docs/configuration/theming.mdx b/docs/admin_docs/configuration/theming.mdx
index 46e30e58b16..fba51b00fd2 100644
--- a/docs/admin_docs/configuration/theming.mdx
+++ b/docs/admin_docs/configuration/theming.mdx
@@ -88,6 +88,22 @@ THEME_DARK = {
 # - OS preference detection is automatically enabled
 ```
 
+### Default Theme Mode
+
+By default, Superset mimics the visitor's OS/browser preference (light or dark) for
+sessions that don't have a saved user preference. Use `THEME_DEFAULT_MODE` to override
+that starting point instance-wide:
+
+```python
+# Default theme mode for sessions without a saved user preference.
+# One of "default" (always light), "dark" (always dark), or "system" (mimic OS preference).
+THEME_DEFAULT_MODE = "dark"
+```
+
+- `"system"` (the default) preserves the existing behavior of following the OS/browser preference.
+- `"default"` or `"dark"` forces that starting mode for first-time visitors; users can still switch themes manually afterward if both `THEME_DEFAULT` and `THEME_DARK` are available.
+- A user's own saved preference, once they toggle the theme switcher, always takes precedence over `THEME_DEFAULT_MODE`.
+
 ### App Branding
 
 The application name shown in the browser title bar and navigation can be