Frontend: globales markdown.css statt 4 CSS-Duplikaten

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
team3
2026-06-12 08:10:36 +02:00
parent f4c16eed84
commit 601237bbbf
6 changed files with 81 additions and 165 deletions

View File

@@ -0,0 +1,73 @@
/* Gemeinsames Markdown-Styling für v-html-Inhalte (renderMarkdown).
v-html-Kinder tragen keine data-v-Attribute — daher globale Regeln statt
:deep()-Kopien in jeder Komponente. Komponenten-Overrides bleiben scoped
und gewinnen per Spezifität (z. B. pre-Scroll in TopicDetail). */
.markdown p {
margin: 0 0 0.5em;
}
.markdown p:last-child {
margin-bottom: 0;
}
.markdown ul,
.markdown ol {
margin: 0.3em 0;
padding-left: 1.2em;
}
.markdown li {
margin: 0.15em 0;
}
.markdown code {
background: var(--border);
padding: 1px 4px;
border-radius: 4px;
font-family: "SF Mono", Consolas, monospace;
font-size: 0.85em;
/* Lange Bezeichner (Namespaces, Pfade) dürfen umbrechen statt zu überlaufen */
overflow-wrap: anywhere;
}
.markdown pre {
background: var(--code-bg, #1e2330);
color: var(--code-fg, #e6e8ee);
padding: 10px 12px;
border-radius: 8px;
/* Default: umbrechen (schmale Sidebars/Karten) — die breite Lese-Ansicht
in TopicDetail überschreibt auf horizontales Scrollen */
white-space: pre-wrap;
overflow-wrap: anywhere;
margin: 0.5em 0;
}
.markdown pre code {
background: none;
padding: 0;
color: inherit;
font-size: 0.85em;
}
.markdown h1,
.markdown h2,
.markdown h3 {
font-size: 0.95em;
margin: 0.6em 0 0.3em;
}
.markdown a {
color: var(--accent-hover);
}
.markdown table {
border-collapse: collapse;
font-size: 0.95em;
}
.markdown th,
.markdown td {
border: 1px solid var(--border-strong);
padding: 2px 6px;
}