fix(editor): 任务列表复选框按像素墨迹对齐第一行(docs/33 三次修正)

用户三次反馈:字形框量 0px 仍看着偏上。改按 2 倍截图像素墨迹量:
汉字墨迹中心比字形框中心低,框实测高 1.25px,margin-top 下调
1.25px(公式修正项 -1px 改 +0.25px)。复测三项墨迹中心差
+0.25/-0.75/-0.75px,已在像素量化噪声内。vitest 154+2、构建通过。
This commit is contained in:
Muse
2026-11-16 11:49:38 +08:00
parent e83b97567c
commit 7511577ce2
2 changed files with 11 additions and 2 deletions

View File

@@ -198,7 +198,7 @@ kbd { background: var(--code-bg); border: 1px solid var(--border); border-radius
会把文字整段顶下去、看起来与复选框不在一行(docs/33):首段去上边距、末段去下边距 */
.milkdown .ProseMirror li.task-item p:first-child { margin-top: 0; }
.milkdown .ProseMirror li.task-item p:last-child { margin-bottom: 0; }
.milkdown .ProseMirror .task-checkbox { font-size: inherit; margin-top: calc((1.78em - 15px) / 2 - 1px); width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex: none; }
.milkdown .ProseMirror .task-checkbox { font-size: inherit; margin-top: calc((1.78em - 15px) / 2 + 0.25px); width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex: none; }
.milkdown .ProseMirror li[data-checked='true'] .task-content { color: var(--text-dim); }
.editor-pane-wrap { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; }
/* 编辑面填满窗格高度:空文档/短文档时下方大片区域也是可点击的输入面,