Add dark theme support in CSS and fix neutral color variable in HTML template

This commit is contained in:
2026-02-06 18:33:44 +03:00
parent 30c08d497f
commit 0151b9a01f
2 changed files with 41 additions and 1 deletions

View File

@@ -36,4 +36,44 @@
--noise: 0;
}
@plugin "daisyui/theme" {
name: "dark";
default: false;
prefersdark: true;
color-scheme: "dark";
--color-base-100: oklch(22% 0.014 260);
--color-base-200: oklch(19% 0.012 260);
--color-base-300: oklch(16% 0.01 260);
--color-base-content: oklch(95% 0.01 260);
--color-primary: oklch(58% 0.2 270);
--color-primary-content: oklch(96% 0.02 272);
--color-secondary: oklch(62% 0.15 250);
--color-secondary-content: oklch(96% 0.02 250);
--color-accent: oklch(72% 0.18 280);
--color-accent-content: oklch(20% 0.02 280);
--color-neutral: oklch(28% 0.02 260);
--color-neutral-content: oklch(92% 0.004 286.32);
--color-info: oklch(74% 0.16 232.661);
--color-info-content: oklch(29% 0.066 243.157);
--color-success: oklch(76% 0.177 163.223);
--color-success-content: oklch(37% 0.077 168.94);
--color-warning: oklch(82% 0.189 84.429);
--color-warning-content: oklch(41% 0.112 45.904);
--color-error: oklch(71% 0.194 13.428);
--color-error-content: oklch(27% 0.105 12.094);
--radius-selector: 0.5rem;
--radius-field: 0.25rem;
--radius-box: 0.5rem;
--size-selector: 0.25rem;
--size-field: 0.25rem;
--border: 1px;
--depth: 1;
--noise: 0;
}
/* Dark theme: main content area uses base-200 so navbar and cards (base-100) stand out */
[data-theme=dark] main {
background-color: var(--color-base-200);
}
@source "../../templates";