feat: coloration syntaxique via CSS classes (themeable)
Remplace les styles inline syntect par des classes CSS. Le CSS est généré côté Rust (base16-ocean.dark) et injecté au démarrage via get_syntax_highlight_css. Les thèmes peuvent surcharger .syntax-highlighting et les classes de tokens. Supprime le lien CDN highlight.js inutilisé. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,15 +98,21 @@ body {
|
||||
border: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
/* Bloc de code (entre triple backticks) */
|
||||
.content pre {
|
||||
/* Bloc de code sans coloration syntaxique */
|
||||
.content pre:not(.syntax-highlighting) {
|
||||
background: #0f172a;
|
||||
border: 1px solid #1e293b;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
/* Texte à l'intérieur d'un bloc de code */
|
||||
.content pre code {
|
||||
/* Bloc de code avec coloration syntaxique */
|
||||
.content .syntax-highlighting {
|
||||
border: 1px solid #1e293b;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
/* Texte dans un bloc sans coloration */
|
||||
.content pre:not(.syntax-highlighting) code {
|
||||
background: none;
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
@@ -9,8 +9,9 @@ body { background: #f1f5f9; }
|
||||
.content p { color: #1e293b; }
|
||||
.content ul li, .content ol li { color: #1e293b; }
|
||||
.content code { background: #f1f5f9; color: #4f46e5; border: 1px solid #e2e8f0; }
|
||||
.content pre { background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; }
|
||||
.content pre code { background: none; color: #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; }
|
||||
.content blockquote { border-color: #818cf8; background: #f5f3ff; color: #4338ca; }
|
||||
.content table { color: #374151; }
|
||||
.content table th { border-bottom-color: #4f46e5; color: #334155; }
|
||||
|
||||
Reference in New Issue
Block a user