Repository navigation
空代码块占位提示语与块头重叠修复 - #329
Merged
todosdev[bot] merged 1 commit intoNov 30, 2026
Merged
空代码块占位提示语与块头重叠修复#329
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
.code-blockwrapper 上、与块头行(语言名/语言选择器)重叠的问题。.code-block.is-empty::before抑制该伪元素,空代码块不再显示这条提示;普通空段落的占位行为零变化。atom叶子节点(非 textblock),不会命中 Placeholder 装饰的isTextblock条件,无需一并修改。改动
web/src/index.css:在既有.wiki-content .is-empty::before规则之后新增一条.wiki-content .code-block.is-empty::before { display: none; },并附注释说明根因(Placeholder 装饰落在代码块 wrapper、浮动伪元素压住块头)。测试
pnpm --filter web test:103 个文件、1321 个用例全绿,覆盖 PageEdit、CodeBlockCollapse、EditorToolbar、paste、roundtrip 等既有编辑器测试。pnpm --filter worker test:72 个文件、891 个用例全绿。pnpm --filter web typecheck:tsc --noEmit通过。biome check web/src/index.css:无新增告警(现存 16 条noDescendingSpecificity均位于既有主题色段落,与本改动无关)。