web-infra-dev / rspress

🦀💨 A fast Rspack-based static site generator.
https://rspress.dev
MIT License
1.19k stars 106 forks source link

fix(theme-default): heading anchor doesn't display when no sidebar or minimum content area #1096

Closed shulaoda closed 1 month ago

shulaoda commented 1 month ago

Fixed #1092

Summary

This issue also exists without sidebar.

This is because the area size of the content padding-left is 24px, and due to the font-size of h1 being 1.875em, which is 30px, the size of the anchor's margin-left is 26.1px, so exceeding it will be hidden. In contrast, the font-size of h1 in vitepress is fixed at 28px, so this issue will not occur.

The solution is as follows:

  1. Change the baseline font-size of the title
  2. Expand the content area padding-left to 26px

Related Issue

1092

Checklist

netlify[bot] commented 1 month ago

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
Latest commit 5aec74110fef20861bef1fc3c7ce5d1b42c0709a
Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/6648c9803706430008f9ee60
Deploy Preview https://deploy-preview-1096--aquamarine-blini-95325f.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
1 paths audited
Performance: 94 (🟢 up 5 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.