fix(web): make scrollbars visible (were 6px transparent, looked absent)

用户反馈「整个页面没有滚动条、没办法往下滚动」。根因:theme.css 滚动条 6px
+ 透明轨道 + 浅灰 thumb,在 macOS overlay 滚动条下近乎隐形,长页面(如设计中心
812 页 10209px)能滚但看不到条、误以为滚不动。

改:10px 宽 + 浅底轨道(--surface-2) + 可见 thumb(--line-strong,padding-box
描边) + hover 加深;`* { scrollbar-width:thin; scrollbar-color }` 兼容 Firefox。
全局生效(壳层 + amis 区域)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-19 22:05:16 +08:00
parent 2278cbce4b
commit 8603d0f8d8

View File

@@ -136,10 +136,17 @@ body {
margin: 0;
}
/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
/* 滚动条 —— 做成清晰可见(原 6px 透明轨道+浅灰 thumb 在 macOS overlay 下近乎隐形,
用户误以为「没有滚动条/滚不动」)。10px 宽 + 浅底轨道 + 可见 thumb + hover 加深;
Firefox 用 scrollbar-* 同口径。 */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb {
background: var(--line-strong); border-radius: 6px;
border: 2px solid var(--surface-2); background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
/* ============================================================================
通用工具类(全局可用)