The contenteditable + CodeJar + Prism approach (Tasks 1-12 + 4 smoke fixes shipped this session) hit too many contenteditable edge cases to ship: - Copy collapses multi-line selections to one line (Selection.toString() doesn't reliably reconstruct newlines across Prism's tokenized <span> topology). - Enter sometimes requires two presses + cursor color shifts (caret lands "between" sibling tokenized spans; first Enter shifts it into a real text node, second actually inserts). - Cascade of earlier bugs already fixed (cursor jumped to start, then end; popup-accepted-quote duplicated; popup didn't accept at end-of-line) were all symptoms of the same root cause: manual Range API manipulation against tokenized contenteditable DOM is unreliable. Exiting the sunk-cost path before more fixes accrue. The next attempt will be a fresh brainstorming session weighing CodeMirror 6 (battle- tested, accepts a one-time bundler step) vs textarea-overlay (real <textarea> for editing, passive <pre> highlight, no contenteditable). Kept (informs the next attempt): - spec + plan documents in docs/superpowers/ - Playwright scaffolding (conftest + smoke test) + dev deps + e2e marker - scripts/dev-server.py (independent of editor approach) - AGENTS.md sandbox + Chromium Mach-port notes Removed: - editor JS (editor.js, srccfg-grammar.js) - editor CSS (editor.css) - vendored CodeJar + Prism + README - srccfg vocab data - editor partial (_editor_assets.html) - template wiring (data-editor-language attributes, asset partial includes, files-editor language <select>) - files-overlay.js editor bridge (setEditorContent helper, dropdown listener, filename-handler auto-redetect, dropdown reset) - tokens.css syntax-color additions (dead without the editor) - form-contract tests in test_blueprints.py + test_script_overlay_routes.py - the editor-specific Playwright test (test_editor.py) - create-blueprint modal trim that was tied to editor UX (Arguments + Config textareas restored) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
59 lines
1.6 KiB
CSS
59 lines
1.6 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;
|
|
|
|
--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;
|
|
}
|
|
}
|
|
|
|
a {
|
|
color: var(--color-link);
|
|
}
|