Addresses Important #1 + #2 from the Task 3 code review: - Adds --color-string, --color-keyword, --color-number, --color-bg-popover-active to tokens.css in both the :root and dark blocks. GitHub-style palette tuned for legibility on each theme's surface. - Updates .editor-code to use the same padding tokens, font-family stack, font-size, and line-height as the existing textarea rule so the contenteditable doesn't visibly jump when the widget mounts. - Drops the caret-color override (browser default adapts to system theme — no token needed). Plan source block updated to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
67 lines
1.8 KiB
CSS
67 lines
1.8 KiB
CSS
:root {
|
|
--color-bg: #f4f4f5;
|
|
--color-surface: #ffffff;
|
|
--color-surface-muted: #f8fafc;
|
|
--color-text: #18181b;
|
|
--color-muted: #60646c;
|
|
--color-border: #d4d4d8;
|
|
--color-link: #1d4ed8;
|
|
--color-primary: #1d4ed8;
|
|
--color-danger: #b42318;
|
|
--color-warning: #a15c07;
|
|
--color-success: #067647;
|
|
--color-focus: #2563eb;
|
|
--color-log-bg: #f8fafc;
|
|
--color-log-text: #18181b;
|
|
--color-string: #0a3069;
|
|
--color-keyword: #cf222e;
|
|
--color-number: #0550ae;
|
|
--color-bg-popover-active: #f3f4f6;
|
|
|
|
--space-base: 0.25rem;
|
|
--space-xs: var(--space-base);
|
|
--space-s: calc(var(--space-base) * 2);
|
|
--space-m: calc(var(--space-base) * 3);
|
|
--space-l: calc(var(--space-base) * 4);
|
|
--space-xl: calc(var(--space-base) * 6);
|
|
--space-2xl: calc(var(--space-base) * 8);
|
|
|
|
--radius-base: 0.25rem;
|
|
--radius-s: var(--radius-base);
|
|
--radius-m: calc(var(--radius-base) * 2);
|
|
|
|
--line: 1px solid var(--color-border);
|
|
--line-soft: 1px solid color-mix(in srgb, var(--color-border) 50%, transparent);
|
|
|
|
/* Filled buttons stay saturated in both themes — white text needs a deep
|
|
background to read. Don't redefine these in the dark-mode block. */
|
|
--color-button-primary: #1d4ed8;
|
|
--color-button-danger: #b42318;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--color-bg: #18181b;
|
|
--color-surface: #27272a;
|
|
--color-surface-muted: #1f1f23;
|
|
--color-text: #f4f4f5;
|
|
--color-muted: #a1a1aa;
|
|
--color-border: #3f3f46;
|
|
--color-link: #93c5fd;
|
|
--color-primary: #93c5fd;
|
|
--color-danger: #fca5a5;
|
|
--color-warning: #fcd34d;
|
|
--color-success: #86efac;
|
|
--color-focus: #bfdbfe;
|
|
--color-log-bg: #111827;
|
|
--color-log-text: #e5e7eb;
|
|
--color-string: #a5d6ff;
|
|
--color-keyword: #ff7b72;
|
|
--color-number: #79c0ff;
|
|
--color-bg-popover-active: #374151;
|
|
}
|
|
}
|
|
|
|
a {
|
|
color: var(--color-link);
|
|
}
|