Files
aichat/src/styles/index.scss
T
2026-11-05 10:46:36 +08:00

93 lines
2.1 KiB
SCSS

:root {
color-scheme: light;
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
line-height: 1.5;
font-weight: 400;
// 屏蔽硬编码 #1f2937 / #eef3f9:回落到 Element Plus 变量(html.dark 下自动切深色)
color: var(--el-text-color-primary);
background: var(--el-bg-color-page);
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
* {
box-sizing: border-box;
}
html,
body,
#app {
margin: 0;
min-height: 100%;
}
html,
body {
// 浏览器窗口缩不下去的兜底:侧栏在窄视口会**整体隐藏**(不渲染、占 0 宽,
// 见 stores/config.ts 的判定阶梯),所以最小视口只剩聊天面板本身:
// CHAT_PANEL_MIN_WIDTH = 480px。视口 < 480 时布局不再压缩,而是横向溢出
//(相当于窗口「不能再缩小」)。写在根元素 html 上保证视口级生效,
// body 同步一条以防内联布局场景。
min-width: 480px;
}
body {
// 原先的浅色渐变已移除:.chat-layout 是不透明满屏背景,body 渐变本来就盖在下面看不见,
// 同时它在深色下会变成一块刺眼的浅底。
background-color: var(--el-bg-color-page);
}
button,
input,
textarea {
font: inherit;
}
#app {
color: var(--el-text-color-primary);
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-thumb {
border-radius: 999px;
// 屏蔽硬编码 rgba(31, 41, 55, 0.18):深色下几乎不可见
background: var(--el-fill-color);
}
::-webkit-scrollbar-track {
background: transparent;
}
// Markdown 表格:只用 EP 变量,深浅双色自适应
.md-table-wrapper {
overflow-x: auto;
margin: 12px 0;
table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
th,
td {
border: 1px solid var(--el-border-color-light);
padding: 6px 10px;
text-align: left;
}
th {
background: var(--el-fill-color-light);
font-weight: 600;
}
tr:nth-child(even) td {
background: var(--el-fill-color-blank);
}
}
}