fix(chat): 修复暗黑模式下 Markdown 和滚动条样式 — 响应式 useIsDark hook + 动态主题切换

This commit is contained in:
2026-06-02 22:44:46 +08:00
parent ed97b30d51
commit 1f05f259d0
7 changed files with 73 additions and 12 deletions

View File

@@ -225,23 +225,42 @@ body {
--os-handle-interactive-area-offset: 4px;
}
.x-markdown-light table {
.os-theme-custom-dark {
--os-size: 8px;
--os-padding-perpendicular: 2px;
--os-padding-axis: 2px;
--os-track-border-radius: 10px;
--os-handle-border-radius: 10px;
--os-handle-bg: rgba(255, 255, 255, 0.15);
--os-handle-bg-hover: rgba(255, 255, 255, 0.25);
--os-handle-bg-active: rgba(255, 255, 255, 0.35);
--os-handle-min-size: 33px;
--os-handle-max-size: none;
--os-handle-interactive-area-offset: 4px;
}
.x-markdown-light table,
.x-markdown-dark table {
border-collapse: collapse;
width: 100%;
}
.x-markdown-light th,
.x-markdown-light td {
.x-markdown-light td,
.x-markdown-dark th,
.x-markdown-dark td {
border: 1px solid var(--ant-color-border);
padding: 6px 12px;
text-align: left;
}
.x-markdown-light th {
.x-markdown-light th,
.x-markdown-dark th {
background: var(--ant-color-fill-quaternary);
font-weight: 600;
}
.x-markdown-light .x-md-table-wrap {
.x-markdown-light .x-md-table-wrap,
.x-markdown-dark .x-md-table-wrap {
overflow-x: auto;
}