Skip to content

fix: prevent # headerlink overlapping [source] in autodoc - #157

Merged
lepture merged 1 commit into
lepture:mainfrom
hwhsu1231-fork:fix/headerlink-overlap-source
Sep 19, 2026
Merged

lepture merged 1 commit into
lepture:mainfrom
hwhsu1231-fork:fix/headerlink-overlap-source

Conversation

@hwhsu1231

@hwhsu1231 hwhsu1231 commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

dt.sig uses a negative text-indent for its hanging indent. Since text-indent is inherited, the a.headerlink (display: inline-block) also received it, shifting the "#" glyph 2.4rem to the left and placing it on top of the [source] button on the second line.

Reset text-indent to 0 on .yue a.headerlink.

Fix: #159

`dt.sig` uses a negative `text-indent` for its hanging indent. Since
`text-indent` is inherited, the `a.headerlink` (`display: inline-block`)
also received it, shifting the "#" glyph `2.4rem` to the left and
placing it on top of the `[source]` button on the second line.

Reset `text-indent` to `0` on `.yue a.headerlink`.
@hwhsu1231

Copy link
Copy Markdown
Contributor Author

Preview of the Modification

Before

Screenshot_20260913_233602

After

Screenshot_20260913_233621

@lepture
lepture merged commit d28720d into lepture:main Sep 19, 2026
13 checks passed
@hwhsu1231
hwhsu1231 deleted the fix/headerlink-overlap-source branch October 9, 2026 07:12
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.

Anchor link overlapping the [source] link on hover

2 participants