feat(desktop): 代码块添加语言标签和固定头部栏#4254
Closed
whale-fall-ouo wants to merge 1 commit into
Closed
Conversation
- 代码块顶部新增 header,显示语言标签和复制按钮 - header 在 pre 外部,不受代码滚动影响,始终可见 - 无语言标签时保持原样,有语言标签时显示 header
Collaborator
|
这样的改动可以附一张截图吗? |
Contributor
Author
Collaborator
|
Thanks @whale-fall-ouo for the thoughtful code-block UX improvement here. The fixed header, visible language label, and keeping copy controls available for long snippets are useful contributions. I carried that direction into #3120 in I am closing this as superseded by #3120 so we keep one code-block implementation path. Your contribution is credited there as part of the final repository change. |
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.


功能说明
为代码块添加固定的头部栏,包含语言标签和复制按钮。
改动内容
<pre>外部新增code-block__header容器,包含语言标签和复制按钮.code-block__header(sticky 顶部栏)、.code-block__lang(语言标签)、.code-block__header + .code(去掉顶部圆角和 margin)效果