diff --git a/public/streak-animation.html b/public/streak-animation.html
index 624c7d0..18abc36 100644
--- a/public/streak-animation.html
+++ b/public/streak-animation.html
@@ -400,8 +400,8 @@
setInterval(() => {
let isLight = false;
try {
- isLight = window.parent.document.documentElement.classList.contains('light') ||
- window.parent.document.documentElement.getAttribute('data-theme') === 'light';
+ // In Tailwind next-themes class strategy, light mode is defined by the absence of the 'dark' class.
+ isLight = !window.parent.document.documentElement.classList.contains('dark');
} catch (e) {
const p = new URLSearchParams(window.location.search);
isLight = p.get('theme') === 'light';
diff --git a/scratch/port_streak_clean.py b/scratch/port_streak_clean.py
index ba926e4..3ed15e1 100644
--- a/scratch/port_streak_clean.py
+++ b/scratch/port_streak_clean.py
@@ -87,8 +87,8 @@ def port_html():
setInterval(() => {
let isLight = false;
try {
- isLight = window.parent.document.documentElement.classList.contains('light') ||
- window.parent.document.documentElement.getAttribute('data-theme') === 'light';
+ // In Tailwind next-themes class strategy, light mode is defined by the absence of the 'dark' class.
+ isLight = !window.parent.document.documentElement.classList.contains('dark');
} catch (e) {
const p = new URLSearchParams(window.location.search);
isLight = p.get('theme') === 'light';