Skip to content

让文章目录的悬停按钮贴合文字 - #2

Merged
cursor[bot] merged 1 commit into
masterfrom
cursor/toc-buttons-ac1b
Nov 3, 2026
Merged

cursor[bot] merged 1 commit into
masterfrom
cursor/toc-buttons-ac1b

Conversation

@Musicaldg

@Musicaldg Musicaldg commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

文章右侧目录去掉静止时的左侧竖线。每条目录只在悬停时出现浅色按钮,宽度跟文字本身一致。当前章节仍用蓝色文字标出,没有底色。

悬停时目录按钮贴合文字
toc-hover.mp4

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Note

Low Risk
Presentation-only CSS for article TOC; no logic, markup, or mobile TOC block changes.

Reviewed by Cursor Bugbot for commit 5251469. Bugbot is set up for automated code reviews on this repo. Configure here.

Drop the resting left rule and show a text-width button only while a directory link is hovered.

Co-authored-by: Jingwei Yuan <Musicaldg@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5251469. Configure here.

Comment thread assets/style.css
.toc-title { font-size: 12px; color: var(--text-200); margin: 0 0 8px 8px; }
.toc-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13px; }
.toc-links a { display: inline-block; max-width: 100%; padding: 3px 8px; border-radius: 8px; line-height: 1.45; color: var(--text-200); }
.toc-links a.toc-level-3 { margin-left: 14px; font-size: 12px; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Level-3 TOC items overflow

Low Severity

Level-3 links combine margin-left with max-width: 100%. Margin sits outside that cap, so a wrapping heading is as wide as the column plus 14px and can make .desktop-toc scroll horizontally.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5251469. Configure here.

@cursor
cursor Bot merged commit 5251469 into master Nov 3, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
github-pages — 52514691 Deployed Nov 3, 2026 by github-pages[bot] via deploy #25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants