next-theme-toggle
Version:
A CLI tool that instantly sets up dark/light theme toggling in your Next.js projects + Tailwind CSS v4 with zero configuration hassle.
36 lines (30 loc) • 763 B
CSS
@import "tailwindcss";
:root {
--background: #ffffff;
--foreground: #171717;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
}
@variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}
* {
transition: background-color 0.3s ease, border-color 0.3s ease,
color 0.3s ease;
}
.transition-all {
transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
body {
background: var(--background);
color: var(--foreground);
font-family: Arial, Helvetica, sans-serif;
}