fix(nav): align sidebar order numbers to the first line of wrapped titles#5
Merged
Conversation
…tles The number/title flex row used items-center, so on titles that wrap to 2-3 lines the number floated to the vertical middle of the block instead of sitting on the first line. Switch to items-baseline and pin the number column to a fixed, non-shrinking width with tabular-nums so all titles start at the same x-position regardless of wrapping.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the docs sidebar, each nav item's order number (01–18) was vertically centered against its title. On titles that wrap to 2–3 lines (guides 11, 12, 13, 14, 17), the number floated to the middle of the block instead of sitting on the first line.
Fix
src/components/NavLink.astro: the number+title flex row useditems-center; changed toitems-baselineso the number aligns to the title's first line. Addedshrink-0 tabular-numsto the number span so itsw-6column can't compress and the digits stay uniform-width.No other visual change — font, size, color, spacing, hover/active states, and single-line rows are untouched, verified in both themes.
Verification
Built and screenshotted the sidebar with Playwright (light + dark), before and after — numbers 11–18 now sit on the first line of their titles and form a clean straight column; the active-item highlight and single-line rows are unchanged.
bunx astro check,bun run lint,bun run build(99 pages) all clean.