fix: isoler le style du code inline pour ne pas affecter les blocs pre

.content code dans les thèmes ciblait aussi le <code> dans <pre>,
écrasant les couleurs syntect par héritage et ajoutant une bordure
indésirable. Changé en .content :not(pre) > code + reset explicite
dans style.css (border: none, color: inherit).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 15:44:00 +02:00
parent df899bd1a8
commit ebb648bb2d
4 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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; }
@@ -80,4 +80,5 @@ mod tests {
let css = syntax_css_for_theme("nonexistent-theme-xyz");
assert!(css.is_empty());
}
}
+1 -1
View File
@@ -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);