diff --git a/src-tauri/resources/themes/default.css b/src-tauri/resources/themes/default.css index 8e8b2f9..4c221e1 100644 --- a/src-tauri/resources/themes/default.css +++ b/src-tauri/resources/themes/default.css @@ -92,7 +92,7 @@ body { /* ── Code ───────────────────────────────────── */ /* Code inline (entre backticks simples) */ -.content code { +.content :not(pre) > code { background: #f1f5f9; color: #4f46e5; border: 1px solid #e2e8f0; diff --git a/src-tauri/resources/themes/shell-indigo.css b/src-tauri/resources/themes/shell-indigo.css index e3b5740..e86e760 100644 --- a/src-tauri/resources/themes/shell-indigo.css +++ b/src-tauri/resources/themes/shell-indigo.css @@ -8,7 +8,7 @@ body { background: #f1f5f9; } .content h1, .content h2, .content h3, .content h4, .content h5, .content h6 { color: #0f172a; } .content p { color: #1e293b; } .content ul li, .content ol li { color: #1e293b; } -.content code { background: #f1f5f9; color: #4f46e5; border: 1px solid #e2e8f0; } +.content :not(pre) > code { background: #f1f5f9; color: #4f46e5; border: 1px solid #e2e8f0; } .content pre:not(.syntax-highlighting) { background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; } .content .syntax-highlighting { border: 1px solid #1e293b; border-radius: 10px; } .content pre:not(.syntax-highlighting) code { background: none; color: #e2e8f0; } diff --git a/src-tauri/src/infrastructure/comrak_renderer.rs b/src-tauri/src/infrastructure/comrak_renderer.rs index 150a9cd..7e42d42 100644 --- a/src-tauri/src/infrastructure/comrak_renderer.rs +++ b/src-tauri/src/infrastructure/comrak_renderer.rs @@ -80,4 +80,5 @@ mod tests { let css = syntax_css_for_theme("nonexistent-theme-xyz"); assert!(css.is_empty()); } + } diff --git a/src/style.css b/src/style.css index a212a91..eebc424 100644 --- a/src/style.css +++ b/src/style.css @@ -453,7 +453,7 @@ body { } .content pre { padding: 20px 24px; border-radius: 6px; overflow-x: auto; margin: 16px 0; } .content pre:not(.syntax-highlighting) { background: #f4f4f7; } -.content pre code { background: none; padding: 0; font-weight: 400; font-size: 13px; } +.content pre code { background: none; padding: 0; font-weight: 400; font-size: 13px; border: none; border-radius: 0; color: inherit; } .content blockquote { border-left: 3px solid rgba(34,34,34,0.25);