[Developer] #424 render VPD LLM answer as markdown

This commit is contained in:
devmrko
2026-06-25 13:49:09 +09:00
parent f0843957fa
commit 314d185b17
4 changed files with 211 additions and 9 deletions

View File

@@ -550,7 +550,8 @@ body {
padding: .6rem .8rem;
}
.ai-answer pre {
.ai-answer pre,
.markdown-view {
color: var(--rw-text);
font-family: inherit;
font-size: .95rem;
@@ -559,6 +560,74 @@ body {
white-space: pre-wrap;
}
.markdown-view {
line-height: 1.6;
overflow-x: auto;
}
.markdown-view h2,
.markdown-view h3 {
border: 0;
color: var(--rw-text);
margin: .9rem 0 .45rem;
padding: 0;
}
.markdown-view h2:first-child,
.markdown-view h3:first-child {
margin-top: 0;
}
.markdown-view h2 {
font-size: 1.05rem;
}
.markdown-view h3 {
font-size: .98rem;
}
.markdown-view p {
margin: .45rem 0;
}
.markdown-view ul,
.markdown-view ol {
margin: .45rem 0 .65rem 1.25rem;
padding: 0;
}
.markdown-view code {
background: rgba(49, 45, 42, .08);
border: 1px solid var(--rw-border);
border-radius: 4px;
color: var(--rw-text);
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
font-size: .88em;
padding: .08rem .28rem;
}
.markdown-view table {
background: var(--rw-surface);
border-collapse: collapse;
font-size: .86rem;
margin: .7rem 0;
min-width: 760px;
width: 100%;
}
.markdown-view th,
.markdown-view td {
border: 1px solid var(--rw-border);
padding: .55rem .65rem;
text-align: left;
vertical-align: top;
}
.markdown-view th {
background: var(--rw-surface-muted);
font-weight: 800;
}
@media (max-width: 640px) {
.form-grid .span-2 {
grid-column: span 1;