Fix dark mode auto theme detection
- Add CSS media query for prefers-color-scheme detection - Auto theme now properly follows system dark/light preference - Maintains 3-mode cycle: auto → light → dark → auto - Rebuilds CSS with proper @media rules for [data-theme="auto"] 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a0fffcf4f0
commit
008201aa84
1 changed files with 25 additions and 0 deletions
|
@ -42,6 +42,31 @@ $status-info: #3b82f6;
|
|||
--primary-hover: #{$secondary-color};
|
||||
}
|
||||
|
||||
// Auto theme (follows system preference)
|
||||
@media (prefers-color-scheme: dark) {
|
||||
[data-theme="auto"] {
|
||||
/* Dark theme when system prefers dark */
|
||||
--background-color: #{$dark-bg};
|
||||
--text-color: #{$dark-text};
|
||||
--card-bg: #{$dark-card-bg};
|
||||
--border-color: #{$dark-border};
|
||||
--input-bg: #{$dark-card-bg};
|
||||
--input-border: #{$dark-border};
|
||||
--table-header-bg: #3d3d3d;
|
||||
--table-hover: #3d3d3d;
|
||||
--shadow: rgba(0, 0, 0, 0.3);
|
||||
|
||||
/* Dark theme additional variables */
|
||||
--bg-secondary: #{$dark-card-bg};
|
||||
--bg-hover: #4b5563;
|
||||
--link-color: #60a5fa;
|
||||
--link-hover: #93c5fd;
|
||||
--text-secondary: #9ca3af;
|
||||
--primary-color: #{$primary-color};
|
||||
--primary-hover: #{$secondary-color};
|
||||
}
|
||||
}
|
||||
|
||||
[data-theme="dark"] {
|
||||
/* Dark theme */
|
||||
--background-color: #{$dark-bg};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue