-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-dark-mode-systematically.sh
More file actions
executable file
·60 lines (50 loc) · 1.76 KB
/
debug-dark-mode-systematically.sh
File metadata and controls
executable file
·60 lines (50 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
echo "=== SYSTEMATIC DARK MODE DEBUG ==="
echo ""
echo "1. Testing if your browser detects dark mode..."
echo " Open browser console and run:"
echo " window.matchMedia('(prefers-color-scheme: dark)').matches"
echo " Should return: true"
echo ""
echo "2. Testing if our CSS is being loaded..."
echo " In browser console, run:"
echo " getComputedStyle(document.body).backgroundColor"
echo " Current result: Should be dark if working"
echo ""
echo "3. Force test with browser console:"
echo " document.body.style.backgroundColor = '#0d1117'"
echo " document.body.style.color = '#f0f6fc'"
echo " This should make page dark immediately"
echo ""
echo "4. Check what CSS is actually applied:"
echo " Right-click on page background -> Inspect"
echo " Look at Computed styles for body element"
echo " Check if background-color shows #0d1117 or still light"
echo ""
echo "5. Check CSS media query in DevTools:"
echo " F12 -> Sources tab -> Open style.css"
echo " Look for @media (prefers-color-scheme: dark)"
echo " Should show our nuclear CSS rules"
echo ""
echo "6. Manual CSS override test:"
cat << 'EOF'
In browser console, paste this entire block:
var style = document.createElement('style');
style.innerHTML = `
body, html {
background-color: #0d1117 !important;
color: #f0f6fc !important;
}
.site-header {
background-color: #161b22 !important;
}
a { color: #58a6ff !important; }
`;
document.head.appendChild(style);
EOF
echo ""
echo "If step 6 works but our CSS doesn't, then it's a specificity issue."
echo "If step 6 doesn't work, it might be browser/OS settings."
echo ""
echo "=== CURRENT CSS STATUS ==="
curl -s http://127.0.0.1:4000/assets/css/style.css | grep -A3 "html body," || echo "CSS not found!"