diff --git a/src/claude_code_transcripts/__init__.py b/src/claude_code_transcripts/__init__.py index e4854a3b..02ad7137 100644 --- a/src/claude_code_transcripts/__init__.py +++ b/src/claude_code_transcripts/__init__.py @@ -973,6 +973,9 @@ def render_message(log_type, message_json, timestamp): CSS = """ :root { --bg-color: #f5f5f5; --card-bg: #ffffff; --user-bg: #e3f2fd; --user-border: #1976d2; --assistant-bg: #f5f5f5; --assistant-border: #9e9e9e; --thinking-bg: #fff8e1; --thinking-border: #ffc107; --thinking-text: #666; --tool-bg: #f3e5f5; --tool-border: #9c27b0; --tool-result-bg: #e8f5e9; --tool-error-bg: #ffebee; --text-color: #212121; --text-muted: #757575; --code-bg: #263238; --code-text: #aed581; } +@media (prefers-color-scheme: dark) { +:root { --bg-color: #1a1a1a; --card-bg: #2a2a2a; --user-bg: #1a3a52; --user-border: #4a9eff; --assistant-bg: #262626; --assistant-border: #8a8a8a; --thinking-bg: #3a3420; --thinking-border: #ffc107; --thinking-text: #bbbbbb; --tool-bg: #3a2a42; --tool-border: #ce93d8; --tool-result-bg: #1b3a24; --tool-error-bg: #4a1f1f; --text-color: #e0e0e0; --text-muted: #a0a0a0; --code-bg: #111111; --code-text: #aed581; } +} * { box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg-color); color: var(--text-color); margin: 0; padding: 16px; line-height: 1.6; } .container { max-width: 800px; margin: 0 auto; } diff --git a/tests/__snapshots__/test_generate_html/TestGenerateHtml.test_generates_index_html.html b/tests/__snapshots__/test_generate_html/TestGenerateHtml.test_generates_index_html.html index 693c48ff..45af04a0 100644 --- a/tests/__snapshots__/test_generate_html/TestGenerateHtml.test_generates_index_html.html +++ b/tests/__snapshots__/test_generate_html/TestGenerateHtml.test_generates_index_html.html @@ -6,6 +6,9 @@ Claude Code transcript - Index