theme.css
Raw
1/* Theme tokens for the app's own (non-sakura) colors. The server always renders
2 an explicit data-theme (auto/light/dark) on <html>, so the selectors key off
3 it. Dark values are the exact "vader" palette, so dark mode is unchanged. */
4:root,
5:root[data-theme="light"],
6:root[data-theme="auto"] {
7 --app-bg: #f9f9f9;
8 --app-fg: #4a4a4a;
9 --app-accent: #1d7484;
10 --app-surface: #f1f1f1;
11 --app-border: #d1d1d1;
12 --help-icon-filter: none;
13}
14
15:root[data-theme="dark"] {
16 --app-bg: #120c0e;
17 --app-fg: #d9d8dc;
18 --app-accent: #eb99a1;
19 --app-surface: #40363a;
20 --app-border: #40363a;
21 --help-icon-filter: invert();
22}
23
24/* auto + OS prefers dark: mirror the forced-dark palette */
25@media (prefers-color-scheme: dark) {
26 :root[data-theme="auto"] {
27 --app-bg: #120c0e;
28 --app-fg: #d9d8dc;
29 --app-accent: #eb99a1;
30 --app-surface: #40363a;
31 --app-border: #40363a;
32 --help-icon-filter: invert();
33 }
34}
35
36/* The theme toggle: a small icon button pinned top-right on every page. Resets
37 sakura's accent button skin to a plain bordered icon (id specificity wins). */
38/* Reset the page's generic `form` styling (default.css makes forms full-width
39 flex columns) so the toggle stays a small fixed corner control. */
40#theme-form {
41 position: fixed;
42 top: 0.75rem;
43 right: 0.75rem;
44 z-index: 100;
45 margin: 0;
46 display: block;
47 width: auto;
48 min-width: 0;
49}
50
51#theme-toggle {
52 background: transparent;
53 border: none;
54 color: var(--app-fg);
55 padding: 0.3rem;
56 cursor: pointer;
57 display: flex;
58 align-items: center;
59}
60
61#theme-toggle:hover {
62 background: transparent;
63 color: var(--app-accent);
64}
65
66#theme-toggle svg {
67 width: 1.9rem;
68 height: 1.9rem;
69 display: block;
70}
71