Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: headings collapsing when there is no content to separate them #244

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

SeanCassiere
Copy link
Member

@SeanCassiere SeanCassiere commented Jun 17, 2024

Currently, all headings extracted from the markdown files are wrapped in anchor tags.

Since anchor tags have a display property of inline, when there are adjacent headings and no content to separate them, it causes the headings to collapse onto one another into a single line. See the screenshot below.

Screenshot 2024-06-17 at 20 29 05

The easiest fix for this, without having to use specific CSS selectors, is to set the display: grid; on the outer block containing the markdown content. This fixes the bug and restores order to world 🙌🏼. See the screenshot below.

Screenshot 2024-06-17 at 21 53 39

Copy link

vercel bot commented Jun 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tanstack-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 9:54am

@SeanCassiere SeanCassiere marked this pull request as draft June 17, 2024 08:41
app/components/Doc.tsx Outdated Show resolved Hide resolved
@SeanCassiere SeanCassiere marked this pull request as ready for review June 17, 2024 08:43
@SeanCassiere SeanCassiere marked this pull request as draft June 17, 2024 09:43
@SeanCassiere SeanCassiere marked this pull request as ready for review June 17, 2024 09:55
@SeanCassiere SeanCassiere merged commit 5fe5ce3 into main Jun 17, 2024
4 checks passed
@SeanCassiere SeanCassiere deleted the fix-collapsing-markdown-anchor-tag-headings branch June 17, 2024 18:30
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