hugo-PaperMod icon indicating copy to clipboard operation
hugo-PaperMod copied to clipboard

fix: unexpected shift of the entire article when anchor hidden = false

Open jabee0228 opened this issue 1 year ago • 1 comments

What does this PR change? What problem does it solve?

When a heading occupies an entire line, moving the mouse over the heading causes the entire article to unexpectedly shift down by one line. And adjusted the anchor's underline to align with this modification.

Before: before

After the fix, the following effects are achieved: after Line breaks will also be correct: new h1, h2, h3, h4, h5, and h6 all function correctly.

Was the change discussed in an issue or in the Discussions before? No, this bug was found when I was writing an article.

PR Checklist

  • [ ] This change adds/updates translations and I have used the template present here.
  • [x] I have enabled maintainer edits for this PR.
  • [x] I have verified that the code works as described/as intended.
  • [ ] This change adds a Social Icon which has a permissive license to use it.
  • [x] This change does not include any CDN resources/links.
  • [x] This change does not include any unrelated scripts such as bash and python scripts.
  • [ ] This change updates the overridden internal templates from HUGO's repository.

jabee0228 avatar Dec 18 '24 11:12 jabee0228