文章排版四件套(参考 xLog):盘古之白 + 表格圆角斑马纹 + 代码块封顶与复制按钮 + 标题悬停锚点

- PanguHTML:CJK 与拉丁/数字间补空格,标签原样保留、code/pre 内文本不动;详情/时间线短文/RSS 描述三个出口生效(带单测)
- 表格改圆角容器 + tbody 斑马纹 + 纵向大留白(classic/vivid 双主题)
- pre max-height 30.5em 封顶内部滚动;enhanceProse 注入悬停复制按钮(App 全局委托),按下有 2px 物理感
- 带 id 的 h2-h4 悬停浮现 # 锚点,点击跳转
- 中文字体栈此前已配(PingFang SC 等),无需改动
This commit is contained in:
Sakurasan committed 2026-09-29 00:53:50 +08:00
1 parent 44a24736aa
commit 23771f0661
7 files changed
+257 -14

No files matched your search

+20 -2
View File
@@ -96,8 +96,12 @@ html[data-ui='vivid'] .prose code {font-family:var(--mono);font-size:.88em;
padding:2px 7px;border-radius:6px;}
html[data-ui='vivid'] .prose pre {background:color-mix(in srgb,var(--ink) 92%,var(--accent));
color:#e8e8f0;padding:18px 20px;border-radius:12px;
overflow-x:auto;font-size:13.5px;line-height:1.7;
box-shadow:var(--shadow-lg);}
overflow:auto;font-size:13.5px;line-height:1.7;
box-shadow:var(--shadow-lg);
max-height:30.5em;}
/* 复制按钮(vivid 配色:浅字浮在深底上) */
html[data-ui='vivid'] .pre-copy {color:#e8e8f0;
background:rgba(255,255,255,.14);}
/* 暗色下「92% ink」混出的是浅底,浅底配浅字没法读;暗端换深底微混强调色 */
html[data-ui='vivid'][data-theme='vivid-dark'] .prose pre {
background:color-mix(in srgb,var(--paper) 86%,var(--accent));
@@ -215,3 +219,17 @@ html[data-ui='vivid'] .sr-only {position: absolute;
white-space: nowrap;
border: 0;}
html[data-ui='vivid'] .toc a:active { color: var(--accent); }
/* ---- 表格(xLog 式:圆角容器 + 斑马纹,替代满格线) ---- */
html[data-ui='vivid'] .prose table {width:100%;
border-collapse:separate;border-spacing:0;
margin:1.8em 0;font-size:14px;
border:1px solid var(--line);border-radius:12px;overflow:hidden;}
html[data-ui='vivid'] .prose th, html[data-ui='vivid'] .prose td {border:0;
border-bottom:1px solid var(--line-soft);
padding:12px 18px;text-align:left;}
html[data-ui='vivid'] .prose tr > * + * {border-left:1px solid var(--line-soft);}
html[data-ui='vivid'] .prose tbody tr:last-child td {border-bottom:0;}
html[data-ui='vivid'] .prose th {background:var(--accent-soft);font-weight:600;}
html[data-ui='vivid'] .prose tbody tr:nth-child(even) {background:var(--card);}
/* 标题锚点 + 复制按钮沿用 classic 的 .h-anchor/.pre-copy 基础样式 */