| name | dark-mode-theming |
| description | Dark mode and theming patterns. CSS variables, Tailwind dark mode, system preference, user toggle, Next.js themes. |
Dark Mode & Theming
Dark mode done right: not just inverting colors.
1. CSS Variables (Foundation)
:root {
--color-background: #ffffff;
--color-surface: #f9fafb;
--color-border: #e5e7eb;
--color-text-primary: #111827;
--color-text-secondary: #6b7280;
--color-primary: #3b82f6;
--color-primary-hover: #2563eb;
--color-danger: #ef4444;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
}
[data-theme="dark"],
.dark {
--color-background: #0f172a;
: ;
: ;
: ;
: ;
: ;
: ;
: (,,,);
}
(: dark) {
() {
}
}