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

shahar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 070c09b012 Fix active mode in dark mode menu (#1359)
070c09b012 is described below

commit 070c09b0127632a2d37d874219b1c148730f9358
Author: Shahar Epstein <[email protected]>
AuthorDate: Sun Dec 28 22:08:25 2025 +0200

    Fix active mode in dark mode menu (#1359)
---
 sphinx_airflow_theme/sphinx_airflow_theme/layout.html | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/layout.html 
b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html
index cad3911e2a..1f6f30e5ff 100644
--- a/sphinx_airflow_theme/sphinx_airflow_theme/layout.html
+++ b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html
@@ -359,7 +359,7 @@
         return storedTheme
       }
 
-      return window.matchMedia('(prefers-color-scheme: dark)').matches ? 
'dark' : 'light'
+      return 'auto'
     }
 
     const setTheme = theme => {
@@ -387,10 +387,18 @@
       document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
         element.classList.remove('active')
         element.setAttribute('aria-pressed', 'false')
+        const checkIcon = element.querySelector('.bi.ms-auto')
+        if (checkIcon) {
+            checkIcon.classList.add('d-none')
+        }
       })
 
       btnToActive.classList.add('active')
       btnToActive.setAttribute('aria-pressed', 'true')
+      const activeCheckIcon = btnToActive.querySelector('.bi.ms-auto')
+      if (activeCheckIcon) {
+          activeCheckIcon.classList.remove('d-none')
+      }
       activeThemeIcon.setAttribute('href', svgOfActiveBtn)
       const themeSwitcherLabel = `${themeSwitcherText ? 
themeSwitcherText.textContent : ''} (${btnToActive.dataset.bsThemeValue})`
       themeSwitcher.setAttribute('aria-label', themeSwitcherLabel)

Reply via email to